SNOBOL4OP(1) | CSNOBOL4B 2.3.2 | Janurary 1, 2024

NAME

snobol4op – SNOBOL4 operators

DESCRIPTION

All SNOBOL4 operators can be redefined with OPSYN(). These are the default assignments.

The following operator character sequences are permitted and represent a cross between PDP-10 Macro SNOBOL4, SITBOL and Catspaw SPITBOL usage:

Binary Operators

List of Binary Operators, in decreasing order of precedence. When operators of equal precedence are adjacent, associativity determines order of evaluation.

SPITBOL and BLOCKS extensions control operator definitions are orthogonal and can be controlled separately.

CharDefn.Assoc.Enabled
= _assignmentRIGHTw/ SPITBOL
?pattern matchLEFTw/ SPITBOL
&definableLEFT
|alternationLEFT
#normal concatLEFTw/ BLOCKS
%vertical concatLEFTw/ BLOCKS
spconcatenationLEFT
@definableLEFT
- +subtract, addLEFT
#definableLEFTw/o BLOCKS
*multiplicationLEFT
%definableLEFTw/o BLOCKS
?definableLEFTw/o SPITBOL
/divisionLEFT
^ **exponentiationRIGHT
$ .match namingLEFT
~definableRIGHT

Unary Operators

CharDefn.
\negation
?interrogation
$indirect reference
.none
!none
%none
*unevaluated expression
/none
#none
+positive
-negative
@cursor position assignment
|none
&keyword

SEE ALSO

snobol4(1)