| Previous | Contents |
Two new preprocessor commands %LIST" and "%NOLIST, have been added, to
affect the generation of listing data specified by the command line.
These commands are treated the same way as %LIST_ALL ana %NOLIST_ALL,
respectively.
4.3.7 PL/I V3.5 Now Allows A Default FIXED BINARY Size To Be Selected.
A new compiler command switch has been added to allow the default size of a FIXED BINARY to be set to either 15, or 31. The default size is FIXED_BINARY=31. The following is the command syntax:
PLI/FIXED_BINARY[=option]
option
15 - Sets the default size of fixed binary to 15.
31 - Sets the default size of fixed binary to 31. This is the default
if the qualifier is present without a value or if the qualifier
is omitted.
|
The LTRIM, and RTRIM builtin functions are subsets of the compiler TRIM builtin function.
The TRIM function can trim blanks or other characters from the left or right of a given string. TRIM requires three arguments to accomplish this. The first argument is the input string, the second argument specifies the characters to be trimmed from the left of the input, and the third argument specifies the characters to be trimmed from the right of the input. If either the second or third argument is a null string, no characters are removed from the corresponding end of the input string.
LTRIM has two arguments, the same first two arguments of the TRIM builtin.
RTRIM has two arguments, the same as the first and third argument to the TRIM builtin.
When only the first argument is supplied to the LTRIM, or RTRIM builtin
functions, white space will be removed from the left or right side
respectively.
4.3.9 PL/I V3.5 DEFINED Statement
The usage rules for the DEFINED statement have been relaxed to allow
you to define a variable over another variable having a dissimilar data
type. If the compiler detectes this, a warning message may be issued,
and the variables involved may not be optimized.
4.3.10 PL/I V3.5 Asterisk Subscripts When Referencing An Entire Array
Arrays may now be assigned using asterisks as subscripts. The current
usage of asterisks for declaring arrays passed as parameters remains
the same; new additional functionality is now available to allow non
pointer qualified array assignments.
4.3.11 PL/I V3.5 ADDREL Builtin
The ADDREL builtin is a function that takes a pointer as its first
argument, an integer expression as its second argument, and returns a
pointer which is the sum of the two arguments.
4.3.12 PL/I V3.5 BYTESIZE Builtin
The BYTESIZE builtin is equivalent to the SIZE builtin. This has been
added to for compatibility with other PL/I compilers.
4.3.13 PL/I V3.5 /ALIGN
A new compiler switch has been added to allow for data alignment for RISC machine data types. The syntax:
PLI/ALIGN
/ALIGN - will align structures and aligned bit strings as shown in the
following table.
/NOALIGN - normal alignment. This is the defualt.
DATA TYPE ALIGNMENT
----------------------------------------------------------
fixed bin (p) p <= 7 byte
fixed bin (p) 7 < p < =15 word
fixed bin (p) p > 15 longword
fixed dec (p,q) word
float bin (p) p <= 24 longword
float bin (p) 24 < p <= 53 quadword
float bin (p) p > 53 octaword
float dec (p) p <= 7 longword
float dec (p) 7 < p <= 15 quadword
float dec (p) p > 15 octaword
char byte
char aligned byte
char varying word
bit bit
bit aligned longword
pointer longword
label quadword
entry quadword
file longword
structure max of members
picture byte
offset longword
area longword
|
4.4.1 Installation Of The DECwindows Compiler Interface
If you have installed DECwindows on your system, then one additional
question will be asked during the installation. Step 7 of Section 2 in
the Installation Guide describes the installation options. The
following question will be asked after the question about running the
IVP:
Do you want to install the DECwindows Compiler Interface for VAX PL/I [YES]?
|
Starting with PL/I V2.3, the system interface library (PLI$STARLET.TLB) has been shipped in compressed library format, which reduces the amount of space required to store the library but increases the amount of time required to access and retrieve a component of the library, such as a system service declaration. If you use PLI$STARLET.TLB heavily and you have disk space available, you may want to decompress the library during the installation when the question is asked. If you decide that you want to decompress it after having installed the compressed version, you can use the following command to decompress the library:
$ LIBRARY/DATA=EXPAND/OUTPUT=SYS$COMMON:[SYSLIB] -
SYS$COMMON:[SYSLIB]PLI$STARLET.TLB
|
If VAX PL/I V3.5 is installed on a system that already has a version of VAX PL/I older than V3.0 installed, none of the files in the older version are superseded, because the files on the version 3 kit all have different names. The version 3 compiler is the default compiler once it is installed. The only action required to switch between using the version 3 compiler and a pre-version 3 compiler is to define the PLI$COMPILER logical name to point to the compiler image to use. For example, if you want to use an older version of the compiler in a single process, you can use the command:
$ DEFINE PLI$COMPILER SYS$SYSTEM:PLIG.EXE
|
$ DEFINE/SYSTEM PLI$COMPILER SYS$SYSTEM:PLIG.EXE
|
$ DEFINE PLI$COMPILER SYS$SYSTEM:PLI$COMPILER.EXE
|
dcl 1 TEST_STRUCT static,
2 C char(50);
dcl A fixed bin(15) static,
1 STRUCT based,
5 SUB,
10 ARRAY(A) like TEST_STRUCT;
TEST: procedure;
dcl P ptr,
(LEN, I, J) fixed bin(31);
I, J = LEN + size(P->STRUCT.SUB);
end TEST;
|
DO I = 1 TO 1000;
CHARACTER_STRING = ROUTINE_RETURNING_CHAR_STAR();
END;
|
DO I = 1 TO 1000;
BEGIN;
CHARACTER_STRING = ROUTINE_RETURNING_CHAR_STAR();
END;
END;
|
txt = 'NUM';
n_chars = 2;
SELECT (SUBSTR (txt, 1, n_chars));
WHEN (SUBSTR ('LOG', 1, n_chars)) option = 1;
WHEN (SUBSTR ('NUMBER', 1, n_chars)) option = 2;
OTHERWISE option = 0;
END;
|
txt = 'NUM';
n_chars = 2;
temp = SUBSTR (txt, 1, n_chars);
SELECT (temp);
WHEN (SUBSTR ('LOG', 1, n_chars)) option = 1;
WHEN (SUBSTR ('NUMBER', 1, n_chars)) option = 2;
OTHERWISE option = 0;
END;
|
TEST: PROC OPTIONS (MAIN);
DCL 1 RECORD BASED,
3 ITEM1 CHAR(10),
3 ITEM2 CHAR(20);
PUT EDIT (SIZE(RECORD)) (F(5)); /* %PLI-E-LOCNEED */
END;
|
| Previous | Contents | Contents |