The Regina Rexx Interpreter
Total Page:16
File Type:pdf, Size:1020Kb
The Regina Rexx Interpreter Version 3.5 Mark Hessling <[email protected]> Florian Groûe-Coosmann <[email protected]> December 31, 2009 Original Author: Anders Christensen <[email protected]> Regina Home Page at: http://regina-rexx.sourceforge.net 1 Copyright © 1992-1998 Anders Christensen Copyright © 1998-2009 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 1 Introduction to Regina...................................................................................................................11 1.1 Purpose of this document.......................................................................................................11 1.2 Implementation.......................................................................................................................11 1.3 Ports of Regina.......................................................................................................................12 1.4 Executing Rexx programs with Regina..................................................................................12 1.4.1 Switches..........................................................................................................................13 1.4.2 External Rexx programs.................................................................................................14 2 Rexx Language Constructs............................................................................................................17 2.1 Definitions..............................................................................................................................17 2.2 Null clauses............................................................................................................................18 2.3 Commands.............................................................................................................................20 2.3.1 Assignments...................................................................................................................20 2.4 Instructions.............................................................................................................................21 2.4.1 The ADDRESS Instruction............................................................................................24 2.4.2 The ARG Instruction......................................................................................................30 2.4.3 The CALL Instruction....................................................................................................31 2.4.4 The DO/END Instruction...............................................................................................34 2.4.5 The DROP Instruction....................................................................................................38 2.4.6 The EXIT Instruction.....................................................................................................39 2.4.7 The IF/THEN/ELSE Instruction....................................................................................40 2.4.8 The INTERPRET Instruction.........................................................................................41 2.4.9 The ITERATE Instruction..............................................................................................43 2.4.10 The LEAVE Instruction................................................................................................43 2.4.11 The NOP Instruction.....................................................................................................44 2.4.12 The NUMERIC Instruction..........................................................................................44 2.4.13 The OPTIONS Instruction............................................................................................46 2.4.14 The PARSE Instruction.................................................................................................47 2.4.15 The PROCEDURE Instruction.....................................................................................49 2.4.16 The PULL Instruction...................................................................................................52 2.4.17 The PUSH Instruction...................................................................................................53 2.4.18 The QUEUE Instruction...............................................................................................53 2.4.19 The RETURN Instruction.............................................................................................53 2.4.20 The SAY Instruction.....................................................................................................54 2.4.21 The SELECT/WHEN/OTHERWISE Instruction.........................................................55 2.4.22 The SIGNAL Instruction..............................................................................................56 2.4.23 The TRACE Instruction...............................................................................................59 2.4.24 The UPPER Instruction................................................................................................61 2.5 Operators................................................................................................................................61 2.5.1 Arithmetic Operators......................................................................................................61 2.5.2 Assignment Operators....................................................................................................61 2.5.3 Comparative Operators...................................................................................................61 2.5.4 Concatenation Operators................................................................................................62 2.5.5 Logical Operators...........................................................................................................62 2.6 Special Variables....................................................................................................................63 2.6.1 Local Scope ± User Writeable........................................................................................63 3 RC - (ANSI).........................................................................................................................63 RESULT - (ANSI)...............................................................................................................63 SIGL - (ANSI).....................................................................................................................63 2.6.2 Global Scope ± Read-Only.............................................................................................63 .MN - (ANSI)......................................................................................................................63 .RC - (ANSI)........................................................................................................................63 .RS - (ANSI)........................................................................................................................63 .RESULT - (ANSI)..............................................................................................................63 .LINE - (Regina)..................................................................................................................63 .ENDOFLINE - (Regina)....................................................................................................64 2.7 Implementation-Specific Information....................................................................................64 2.7.1 Miscellaneous.................................................................................................................64 2.7.2 Implementation of the ADDRESS environment............................................................64 2.7.2.1 SYSTEM aka ENVIRONMENT aka OS2ENVIRONMENT...................................65 2.7.2.2 COMMAND aka CMD aka PATH...........................................................................65 2.7.2.3 REXX or REGINA...................................................................................................65 2.7.2.4 ADRRESS WITH on Windows................................................................................66 2.7.3 Regina Restricted Mode.................................................................................................67 2.7.4 Native Language Support...............................................................................................67 2.7.4.1 Error Messages..........................................................................................................67 2.7.4.2 Locale Support..........................................................................................................68 2.7.4.3 Implementation.........................................................................................................68 3 REXX Built-in Functions..............................................................................................................70 3.1 General Information...............................................................................................................70