The Regina Rexx Interpreter
Total Page:16
File Type:pdf, Size:1020Kb
The Regina Rexx Interpreter Version 3.4 Mark Hessling < [email protected] > Florian Gro ße-Coosmann < [email protected] > December 30, 2007 Original Author: Anders Christensen <[email protected]> Regina Home Page at: http://regina-rexx.sourceforge.net 1 Copyright © 1992-1998 Anders Christensen Copyright © 1998-2007 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.....................................................................................................................12 1.1 Purpose of this document.........................................................................................................12 1.2 Implementation.........................................................................................................................12 1.3 Ports of Regina.........................................................................................................................13 1.4 Executing Rexx programs with Regina....................................................................................14 1.4.1 Switches............................................................................................................................15 1.4.2 External Rexx programs...................................................................................................16 2 Rexx Language Constructs..............................................................................................................18 2.1 Definitions................................................................................................................................18 2.2 Null clauses..............................................................................................................................19 2.3 Commands...............................................................................................................................21 2.3.1 Assignments......................................................................................................................21 2.4 Instructions...............................................................................................................................23 2.4.1 The ADDRESS Instruction..............................................................................................25 2.4.2 The ARG Instruction........................................................................................................33 2.4.3 The CALL Instruction......................................................................................................33 2.4.4 The DO/END Instruction.................................................................................................37 2.4.5 The DROP Instruction......................................................................................................41 2.4.6 The EXIT Instruction.......................................................................................................43 2.4.7 The IF/THEN/ELSE Instruction......................................................................................44 2.4.8 The INTERPRET Instruction...........................................................................................45 2.4.9 The ITERATE Instruction................................................................................................47 2.4.10 The LEAVE Instruction..................................................................................................47 2.4.11 The NOP Instruction.......................................................................................................48 2.4.12 The NUMERIC Instruction............................................................................................48 2.4.13 The OPTIONS Instruction..............................................................................................50 2.4.14 The PARSE Instruction...................................................................................................51 2.4.15 The PROCEDURE Instruction.......................................................................................54 2.4.16 The PULL Instruction.....................................................................................................58 2.4.17 The PUSH Instruction.....................................................................................................58 2.4.18 The QUEUE Instruction.................................................................................................58 2.4.19 The RETURN Instruction...............................................................................................59 2.4.20 The SAY Instruction.......................................................................................................60 2.4.21 The SELECT/WHEN/OTHERWISE Instruction...........................................................61 2.4.22 The SIGNAL Instruction................................................................................................62 2.4.23 The TRACE Instruction.................................................................................................65 2.4.24 The UPPER Instruction..................................................................................................67 2.5 Operators..................................................................................................................................68 2.5.1 Arithmetic Operators........................................................................................................68 3 2.5.2 Assignment Operators......................................................................................................68 2.5.3 Comparative Operators....................................................................................................68 2.5.4 Concatenation Operators..................................................................................................69 2.5.5 Logical Operators.............................................................................................................69 2.6 Implementation-Specific Information......................................................................................70 2.6.1 Miscellaneous...................................................................................................................70 2.6.2 Implementation of the ADDRESS environment..............................................................71 2.6.2.1 SYSTEM aka ENVIRONMENT aka OS2ENVIRONMENT...................................71 2.6.2.2 COMMAND aka CMD aka PATH...........................................................................71 2.6.2.3 REXX or REGINA...................................................................................................72 2.6.2.4 ADRRESS WITH on Windows................................................................................72 2.6.3 Regina Restricted Mode...................................................................................................73 2.6.4 Native Language Support.................................................................................................74 2.6.4.1 Error Messages.........................................................................................................74 2.6.4.2 Locale Support..........................................................................................................74 2.6.4.3 Implementation.........................................................................................................75 3 REXX Built-in Functions................................................................................................................77 3.1 General Information.................................................................................................................77 3.1.1 The Syntax Format............................................................................................................77 3.1.2 Precision and Normalization.............................................................................................78 3.1.3 Standard Parameter Names...............................................................................................78 3.1.4 Error Messages.................................................................................................................79 3.1.5 Possible System Dependencies.........................................................................................80 3.1.6 Blanks vs. Spaces..............................................................................................................82 3.2 Regina Built-in Functions........................................................................................................83 ABBREV(long, short [,length]) - (ANSI)................................................................................83 ABS(number) - (ANSI)............................................................................................................83 ADDRESS([option]) - (ANSI).................................................................................................83 ARG([argno [,option]]) - (ANSI).............................................................................................84