Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!dalcs!thompson From: thompson@dalcs.UUCP Newsgroups: comp.bugs.4bsd,comp.lang.fortran Subject: f77 bug: 4.3bsd UNIX f77 improperly handles character constants Message-ID: <2624@dalcs.UUCP> Date: Thu, 3-Sep-87 13:28:03 EDT Article-I.D.: dalcs.2624 Posted: Thu Sep 3 13:28:03 1987 Date-Received: Sat, 5-Sep-87 08:32:24 EDT Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada Lines: 36 Keywords: variable length character constants f77 Xref: utgpu comp.bugs.4bsd:498 comp.lang.fortran:177 Has anyone see this problem before and do they have a fix for it? As stated in the document `A Portable Fortran 77 Compiler' on pages 18 and 19 (Section 3.3 PARAMETER Statement) A character constant may be declaired with an implied length of (*), this does not work with f77, see sample program below. The sample program should compile according to the manual and the standard. This program will work if I replace `(*)' with `(15)'. Script started on Thu Sep 3 13:51:01 1987 %251% cat test.f PROGRAM SHPROB CHARACTER *(*) TSTSTR PARAMETER ( TSTSTR = 'This is a test.' ) WRITE ( 6, 99999 ) TSTSTR STOP 99999 FORMAT ( A ) END %252% f77 test.f test.f: MAIN shprob: Error on line 3 of test.f: Declaration error for tststr: illegal adjustable length character variable Error. No assembly. %253% exit script done on Thu Sep 3 13:51:27 1987 -- Michael A. Thompson, Dept. Math, Stats, & C.S., Dalhousie U., Halifax, N.S. thompson@dalcs.uucp From Bitnet or Uucp thompson@cs.dal.cdn From Bitnet or Cdn thompson%dalcs.uucp@uunet.uu.net From Arpa