|
NAMEsnobol4 - SNOBOL4 interpreterDESCRIPTIONThis manual page describes CSNOBOL4, a port of the original Bell Telephone Labs (BTL) Macro Implementation of SNOBOL4 to the C language.The language and its implementation are described in [Griswold1971] and [Griswold1972]. For command line options see snobol4cmd(1). Extensions from Catspaw SNOBOL4+, SPITBOL and SITBOL have been added, see snobol4ext(1). Includes BLOCKS (SNOBOL4B) extensions, see snobol4blocks(1). ChangesThe following behaviors have been changed from the original Macro SNOBOL4 in ways that might effect old programs:
ExtensionsFurther additions are documented in snobol4ext(1).Character setsnobol4(1) is 8-bit clean, and uses the native character set. Any 8-bit byte is accepted as a SNOBOL datum or in a string constant of a SNOBOL source program. The value of the SNOBOL protected keyword &ALPHABET is a 256-character string of all bytes from 0 to 255, in ascending order.On ASCII-based systems, any character with the 8th bit set is treated as ``alphabetic'', and can start, or be used in identifiers and labels. This includes characters from the ``upper half'' of national character sets and all bytes resulting from the UTF-8 encoding of Unicode characters. Include file utf.sno implements pattern matching functions for UTF-8 sequences. Programs may be entered in mixed case; By default lower case identifiers are folded to upper case (see &CASE and -CASE). Case folding is performed by using the C library islower(3) test, and then using toupper(3) to convert the lower-case characters to upper case. When using UTF-8 encoded characters in code, case folding should be disabled, to prevent any bytes which appear to be lower case in the current locale from being modified. The following operator character sequences are permitted and represent a cross between PDP-10 Macro SNOBOL, SITBOL and Catspaw SPITBOL usage: Assignment: = _ Comment line: * # | ; ! Continuation line: + . Both square brackets ([]) and angle brackets (<>) may be used to subscript arrays and tables. The TAB (ASCII 9) character is accepted as whitespace. Underscore (_) and period (.) are legal within identifiers and labels. Note that the use of the pound sign for comments allows use of the script interpreter (hash-bang) sequence at the top of a file marked as executable: ``#!/usr/local/bin/snobol4'' or ``#!/usr/bin/env snobol4'' See snobol4op(1) for operators. DIRECTORY SEARCH LISTA directory search list is used for files specified in -INCLUDE directives and LOAD() function calls, and is constructed from:1. The current working directory (``.''). 2. Any directories specified on the command line using -I options, in the order specified. 3a. Directories from the the SNOPATH environment variable (see below), if defined. 3b. If SNOPATH is not defined, the SNOLIB environment variable (or a compiled in default) is used as base to add the following directories:
The LOAD() function will also check for the file in shared subdirectory in each directory in the search path. ENVIRONMENT
SEE ALSOsdb(1) SNOBOL4 Debugger snobol4cmd(1) command line options snobol4ctrl(1) control lines snobol4error(1) &ERRTYPE and &ERRTEXT values snobol4ext(1) extensions to BTL SNOBOL4 snobol4func(1) built-in function list snobol4io(1) input/output snobol4key(1) keywords snobol4op(1) operators snobol4blocks(1) SNOBOL4B BLOCKS extension snopea(1) convert snopea documentation to roff and HTML snobol4dirs(3) directory access functions snobol4ezio(3) easy to use file I/O snobol4ffi(3) Foreign Function Interface functions snobol4fork(3) subprocess interface functions snobol4host(3) HOST and O/S functions snobol4logic(3) bit logic & formatting functions snobol4load(3) loading extension modules into SNOBOL4 snobol4ndbm(3) keyed file access functions snobol4random(3) pseudo-random numbers functions snobol4readline(3) input with line editing snobol4setup(3) loadable module builder snobol4sprintf(3) formatting function snobol4sqlite3(3) SQLite database interface functions snobol4sqlite3dbm(3) DBM interface using SQLite snobol4stat(3) file metadata functions snobol4stcl(3) Tcl/Tk interface functions snobol4time(3) date/time functions snolib(3) misc library functions snopea(7) A little ``Plain Old Documentation'' format for SNOBOL4
AUTHORSRalph E. Griswold, James F. Poage, Ivan P. Polonsky, et al (Macro SNOBOL4)Philip. L. Budne (CSNOBOL4) Mark Emmer (code from SNOBOL4+) Viktors Berstis (code from Minnesota SNOBOL4) James F. Gimpel (SNOBOL4B) BUGSI/O is still tied to unit numbers.I/O retains some record oriented flavor (maximum line length on input). ``Dynamic'' storage cannot be expanded after startup. Integer math can never fail, even on overflow. Oversize integer constants may not be detected.
Visit the GSP FreeBSD Man Page Interface. |