[TUHS] ratfor vibe

Ori Idan ori at heliconbooks.com
Fri Feb 4 16:06:32 AEST 2022


SPACE is 32 and NEWLINE is 10 is that the reason that space in ASCII is 32
As for EOF it is 0xFF which is not always -1, depending if your char is
signed or unsigned.

-- 
Ori Idan CEO Helicon Books
http://www.heliconbooks.com





On Thu, Feb 3, 2022 at 10:01 PM Adam Thornton <athornton at gmail.com> wrote:

>
>
> On Wed, Feb 2, 2022 at 9:01 PM Will Senn <will.senn at gmail.com> wrote:
>
>>
>> For example, even in the tiny copy program example, from the introductory
>> chapter, once you include the primitive getc and putc subroutines, there
>> are 7 symbolic constants: MAXLINE, MAXCARD, NEWLINE, STDIN, STDOUT, EOF,
>> SPACE and character, which is really an integer and gets replaced with
>> integer by some mythical preprocessor (chapter 8). Anyhow, in the modern
>> world, MAXLINE and MAXCARD don't really have meaning, but they can
>> magically be treated as lines of a file, the rest do have meaning, but they
>> don't evaluate to the same things in Fortran-land as in modern-land. STDIN
>> is 5 and STDOUT is 6 (card reader and punch LUNs, again some magic that
>> lets them be treated as terminal input and output),  EOF is -1, SPACE is
>> 32, NEWLINE is 10.
>>
>> Pretty sure that EOF is _still_ -1.  SPACE and NEWLINE also look pretty
>> familiar and their values haven't changed, although we might spell them a
>> little differently these days.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20220204/17cad596/attachment.htm>


More information about the TUHS mailing list