Make your own free website on Tripod.com
5.13.1 Where Implementations are Allowed to Differ
TRL is rather relaxed in its specifications of what an interpreter
must implement of the I/O system. It recognizes that operating
systems differ, and that some details must be left to the
implementor to decide, if REXX is to be effectively implemented.
The parts of the I/O subsystem of REXX where implementations are
allowed to differ, are:

·    The functions LINES() and CHARS() are not required to return
  the number of lines or characters left in a stream. TRL says that
  if it is impossible or difficult to calculate the numbers, these
  functions may return 1 unless it is absolutely certain that there
  are no more data left. This leads to some rather kludgy
  programming techniques.

·    Implementations are allowed to ignore closing streams, since
  TRL does not specify a way to do this. Often, the closing of
  streams is implemented as a command, which only makes it more
  incompatible.

·    Check the implementation-specific documentation before using
  the function LINEOUT(file) for closing files.

·    The difference in the action of closing and flushing a file,
  can make a REXX script that works under one implementation crash
  under another, so this feature is of very limited value if you are
  trying to write portable programs.

TRL says that because the operating system environments will
differ a lot, and an efficient and useful interpreter is the most
important goal, implementations are allowed to deviate from the
standard in any respect necessary in the domain of I/O [TRL2].
Thus, you should never assume anything about the I/O system, as
the “rules” listed in TRL are only advisory.



PREV NEXT