Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: Re: FORTRAN horrors Message-ID: <50500043@uxe.cso.uiuc.edu> Date: 1 Apr 88 16:13:00 GMT References: <502@amethyst.UUCP> Lines: 27 Nf-ID: #R:amethyst.UUCP:502:uxe.cso.uiuc.edu:50500043:000:1044 Nf-From: uxe.cso.uiuc.edu!mcdonald Apr 1 10:13:00 1988 >legal subset-language without substrings?) I think fortran 77 has gotten >a bad rap on strings; I've been told on a number of occasions that >Fortran "can't do" string manipulations that I do all the time with >standard ANSI Fortran 77! I'm not talking about hideous bit-pushing hacks, >I'm talking portable code. Now if I could just treat a file as a byte >stream... Fortran 77 DOES have one VERY serious problem with strings: it is impossible to initialize them with non-printing characters. You can, of course, kludge it by installing things in after initialization: character*3 escseq data escseq/' [C'/ ... escseq(1:1) = char(27) Having to do this is just plain stupid: character constants SHOULD have been treated somewhat like C does, with escape sequences: /027, although maybe with the requirement that the escapes have a fixed length, or be terminated by another /. This is fixed in Fortran 88. Doug McDonald .... Now a satisfied C programmer, except for (Ugh!) multidimensional arrays.