Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!van-bc!ubc-cs!alberta!mts.ucs.UAlberta.CA!Al_Dunbar From: userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) Newsgroups: comp.lang.c Subject: Re: more on TRUE and FALSE (side-comment) Message-ID: <1346@mts.ucs.UAlberta.CA> Date: 20 Sep 90 04:53:30 GMT References: <9@christmas.UUCP> <1990Sep19.114448.22151@jarvis.csri.toronto.edu> Organization: MTS Univ of Alberta Lines: 36 In article <1990Sep19.114448.22151@jarvis.csri.toronto.edu>, flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >flee@dictionopolis.cs.psu.edu (Felix Lee) writes: >>Try writing this instead: >> IF(strcmp(name, "hippo"), L10, L20, L10) >> L10: printf("%s is not a hippo\n", name); >> GOTO(L30) >... >>And here are the macros that make it possible: > >Try writing this instead (syntax subject to minor slips of memory): > > if (name(1) .eq. 1hh > 1 .and. name(2) .eq. 1hi > 2 .and. name(3) .eq. 1hp > 3 .and. name(4) .eq. 1hp > 4 .and. name(5) .eq. 1ho) 10, 20, 10 >10 write (6,11),name >11 format (1x, a, 15h is not a hippo) > goto 30 > >And here is the shellscript that makes it possible: > > f77 "$@" Actually, another factor which makes the above possible is the insistence of many Fortran programmers (it must have been a *long* time since you were one) to use the patently obsolete features of the (pre-77) language, such as: arithmetic goto's, hollerith constants, and storing character strings unpacked in integer arrays. -------------------+------------------------------------------- Al Dunbar | Edmonton, Alberta | this space for rent CANADA | -------------------+-------------------------------------------