Regina Rexx Interpreter Version 3.3
Total Page:16
File Type:pdf, Size:1020Kb
The Regina Rexx Interpreter Version 3.3 Anders Christensen <[email protected]> Norwegian Institute of Technology University of Trondheim April 25, 2004 Additions and corrections by Mark Hessling < [email protected] > Regina Home Page at: http://regina-rexx.sourceforge.net 1 Copyright © 1992-1998 Anders Christensen Copyright © 1998-2004 Mark Hessling Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". 2 Table of Contents 1Introduction to Regina......................................................................................................................10 1.1Purpose of this document..........................................................................................................10 1.2Implementation.........................................................................................................................10 1.3Ports of Regina..........................................................................................................................11 1.4Executing Rexx programs with Regina....................................................................................11 1.4.1Switches............................................................................................................................12 1.4.2External Rexx programs....................................................................................................13 2Rexx Language Constructs...............................................................................................................15 2.1Definitions................................................................................................................................15 2.2Null clauses...............................................................................................................................16 2.3Commands................................................................................................................................17 2.3.1.1Assignments...................................................................................................................17 2.4Instructions................................................................................................................................19 2.4.1The ADDRESS Instruction...............................................................................................21 2.4.2The ARG Instruction.........................................................................................................27 2.4.3The CALL Instruction.......................................................................................................28 2.4.4The DO/END Instruction..................................................................................................31 2.4.5The DROP Instruction.......................................................................................................34 2.4.6The EXIT Instruction........................................................................................................36 2.4.7The IF/THEN/ELSE Instruction.......................................................................................37 2.4.8The INTERPRET Instruction............................................................................................37 2.4.9The ITERATE Instruction.................................................................................................39 2.4.10The LEAVE Instruction..................................................................................................40 2.4.11The NOP Instruction.......................................................................................................40 2.4.12The NUMERIC Instruction.............................................................................................40 2.4.13The OPTIONS Instruction..............................................................................................42 2.4.14The PARSE Instruction...................................................................................................43 2.4.15The PROCEDURE Instruction.......................................................................................45 2.4.16The PULL Instruction.....................................................................................................48 2.4.17The PUSH Instruction.....................................................................................................49 2.4.18The QUEUE Instruction..................................................................................................49 2.4.19The RETURN Instruction...............................................................................................49 2.4.20The SAY Instruction.......................................................................................................50 2.4.21The SELECT/WHEN/OTHERWISE Instruction...........................................................51 2.4.22The SIGNAL Instruction.................................................................................................52 2.4.23The TRACE Instruction..................................................................................................54 2.4.24The UPPER Instruction...................................................................................................56 2.5Operators...................................................................................................................................56 2.5.1Arithmetic Operators.........................................................................................................57 2.5.2Assignment Operators.......................................................................................................57 2.5.3Comparative Operators.....................................................................................................57 2.5.4Concatenation Operators...................................................................................................58 2.5.5Logical Operators..............................................................................................................58 2.6Implementation-Specific Information.......................................................................................58 2.6.1Miscellaneous....................................................................................................................58 2.6.2Implementation of the ADDRESS environment...............................................................59 2.6.3Regina Restricted Mode....................................................................................................61 2.6.4Native Language Support..................................................................................................62 3REXX Built-in Functions.................................................................................................................65 3 3.1General Information..................................................................................................................65 3.1.1The Syntax Format............................................................................................................65 3.1.2Precision and Normalization.............................................................................................66 3.1.3Standard Parameter Names...............................................................................................66 3.1.4Error Messages..................................................................................................................67 3.1.5Possible System Dependencies.........................................................................................67 3.1.6Blanks vs. Spaces..............................................................................................................69 3.2Regina Built-in Functions.........................................................................................................69 ABBREV(long, short [,length]) - (ANSI)............................................................................70 ABS(number) - (ANSI)........................................................................................................70 ADDRESS() - (ANSI)..........................................................................................................70 ARG([argno [,option]]) - (ANSI).........................................................................................70 B2C(binstring) - (AREXX)..................................................................................................71 B2X(binstring) - (ANSI)......................................................................................................72 BEEP(frequency [,duration]) - (OS/2)..................................................................................72 BITAND(string1 [,[string2] [,padchar]]) - (ANSI)..............................................................72 BITCHG(string, bit) - (AREXX)..........................................................................................72 BITCLR(string, bit) - (AREXX)..........................................................................................73 BITCOMP(string1, string2, bit [,pad]) - (AREXX).............................................................73