Managing Input and Output
Designed for mainframes and minicomputers, SNOBOL has a cumbersome and not very user-friendly (rather, it’s more user-unfriendly) input/output subsystem built around the concept of an external input/output unit—essentially, a file, using modern-day terminology. The I/O system is also dependent on Fortran-style formatting. Fortunately, it’s easy to turn this dependency off.
Function INPUT(sname,unit,buffer,fname) (not to be confused with the namesake predefined variable) opens the existing disk file fname for reading and associates it with the stream name sname and I/O unit—an integer number related to the C language file handle. The number must be 1 through 32, but doesn’t seem to affect any further operation. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access