public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* re: assigning character strings to double precision values in DATA statements
@ 2004-08-14  9:30 Bud Davis
  0 siblings, 0 replies; 2+ messages in thread
From: Bud Davis @ 2004-08-14  9:30 UTC (permalink / raw)
  To: gcc-help, yoobb

Here is an example using hollerith constants:

$ cat b.f
       double precision a(2)
       data a /8Hred     ,8Hblue    /
       print '(2A)',a
       end
$ g77 b.f
$ ./a.out
red     blue


Is this what you need ?

post a small example of the code in question, it will help us understand
exactly what the issue is.

Hope this helps,
bud davis



^ permalink raw reply	[flat|nested] 2+ messages in thread

* assigning character strings to double precision values in DATA statements
@ 2004-08-14  2:45 Bernard Yoo
  0 siblings, 0 replies; 2+ messages in thread
From: Bernard Yoo @ 2004-08-14  2:45 UTC (permalink / raw)
  To: gcc-help

Hi,

I have an old Fortran 77 program that uses DATA statements to assign 
character strings to variables that have been declared double 
precision.  Many commercial compilers seem to accept this 
"undocumented" method of assignment, but g77 does not.

Is there any way around this?

B.Y.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-14  3:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-14  9:30 assigning character strings to double precision values in DATA statements Bud Davis
  -- strict thread matches above, loose matches on Subject: below --
2004-08-14  2:45 Bernard Yoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).