Module Simula

Class RTS_Bytefile

All Implemented Interfaces:
Runnable
Direct Known Subclasses:
RTS_Directbytefile, RTS_Inbytefile, RTS_Outbytefile

public class RTS_Bytefile extends RTS_File
System class Bytefile.

The class bytefile is the common prefix class for all byte-oriented files.

     file class bytefile;
          begin short integer BYTESIZE;
             short integer procedure bytesize; bytesize := BYTESIZE;
 
          end bytefile;
 
Bytefiles read and write files as continuous streams of bytes. The variable BYTESIZE defines the range of the byte values transferred. Byte values are integers in the range (0:2**BYTESIZE-1). The BYTESIZE value of the file object is accessible through procedure "bytesize".

Note: "Bytesize" returns zero before first "open" of the bytefile.

Link to GitHub: Source File.

Author:
SIMULA Standards Group, Øystein Myhre Andersen
  • Field Details

    • _BYTESIZE

      protected int _BYTESIZE
      The current _BYTESIZE value.
    • _MAXBYTE

      protected final int _MAXBYTE
      The constant _MAXBYTE value.
      See Also:
  • Constructor Details

    • RTS_Bytefile

      public RTS_Bytefile(RTS_RTObject staticLink, RTS_TXT FILENAME)
      Create a new _ByteFile.
      Parameters:
      staticLink - static link
      FILENAME - the file name.
  • Method Details

    • bytesize

      public int bytesize()
      Returns the _BYTESIZE value.
      Returns:
      the _BYTESIZE value.
    • _STM

      public RTS_Bytefile _STM()
      Description copied from class: RTS_RTObject
      Method representing the Statements in this Block
      This method is virtual and must be redefined in blocks.
      Overrides:
      _STM in class RTS_File
      Returns:
      a pointer to this _RTObject