more on TRUE and FALSE (side-comment)
Al Dunbar
userAKDU at mts.ucs.UAlberta.CA
Thu Sep 20 14:53:30 AEST 1990
In article <1990Sep19.114448.22151 at jarvis.csri.toronto.edu>, flaps at dgp.toronto.edu (Alan J Rosenthal) writes:
>flee at 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 |
-------------------+-------------------------------------------
More information about the Comp.lang.c
mailing list