Implementation characteristics

System Release and machine requirements

The SNOBOL4 system will operate on a 2.0 or higher release of DOS, or its equivalent (OS/2 DOS box, for example). An IBM PC or any x86 compatible machine is required. There is no dependence on the BIOS ROM, so most machines should be acceptable. At least 128K of memory is required to run SNOBOL4 programs. Nearly 512K of memory can be used by the SNOBOL4 for storing user programs and data. (Some of the memory is used to hold the predefined variables and functions and internal work areas.) At least one disk drive is required. The Math Co-processor or a 486DX processor or higher is required if you intend to use any floating point operations.

Floating Point

No floating point number capability is available if a Math Co-processor is not installed in a personal computer with less than a 486DX processor. All floating point operations will cause an error message if they cannot be executed. The floating point values are stored in 4 byte single precision form as described by the IEEE standard for binary floating point. The &NAN and &INFINITY keywords were added to the language to accommodate these special values called for in the standard.

DATE

The DATE function returns the date and time as a character string: "MM-DD-YY HH:MM:SS.SS". (Most SNOBOL4 implementations just return the date.)

ARRAY LIMITS

Arrays have a limited to about 50000 elements. Each element of an array occupies 8 bytes of storage. Because the SNOBOL4.2 workspace can be as large as 512K, the theoretical limit is 65535. In practice this cannot be achieved because the interpreter system uses part of the workspace for internal purposes as well as storing the user's SNOBOL4.2 program. Also, note that if your array is much over 25000 elements, you will not be able to make a second copy of it. This may occur when you are trying to convert a large array into a table or vice versa. The 8 bytes mentioned above is enough to store any integer, real number, or the null string. Anything else takes more than 8 bytes. Strings, for example, take approximately 40 bytes plus the string length. Note that the SORT function sorts arrays in-place, so that even large arrays can be sorted because a copy is not required.

TABLE LIMITS

The first and second parameters to the TABLE function cannot exceed 2048. This does not really limit the overall size of the contents of a table. No single extent can hold more than 2048 entries.

CHARACTER STRING LIMITS

The maximum length of a character string is 65496. Note that the default for &MAXLNGTH is 5000.

OUTPUT FUNCTION

The third parameter of the OUTPUT function is ignored. This is a FORTRAN format specification in some other systems. SNOBOL4 will just write the character string given. Some of the examples in the book "SNOBOL4 Programming Language, Second Edition" make clever use of these formats for formatting their output. It is usually more straight forward and clear to do all of the formatting using the SNOBOL4 language itself.

&ALPHABET keyword

The string &ALPHABET is the standard ASCII 128 character collating sequence followed by the 128 additional characters defined for the IBM Personal Computer. See the BASIC reference manual for a complete table of these characters.

&PARM keyword

The string &PARM is an extension to SNOBOL4 and is the text on the command line invoking SNOBOL4 after the command name.

&STLIMIT keyword

&STLIMIT defaults to 2147483647 instead of 50000.

Opening Files

All files are opened when the first input or output operation is performed on them.

LOAD and UNLOAD functions

The LOAD and UNLOAD functions are not supported.

SNOBOL4 OBJECT SIZES

Unit numbers can range from one through 32. File names can be assigned to all of them, however current versions of DOS will not allow that many files to be opened simultaneously (using internal file handles). See FILES command in the CONFIG.SYS file. A file is not opened until a read or write operation is performed. Files can be closed using the ENDFILE function.


Prior Page, Next Page, First Page of the Minnesota SNOBOL4 Reference