[next] [tail] [up]

### 17.1 Constants

The following constants are error codes, returned by the various stream objects.

     CONST
        stOk         =  0; { No stream error }
        stError      = -1; { Access error }
        stInitError  = -2; { Initialize error }
        stReadError  = -3; { Stream read error }
        stWriteError = -4; { Stream write error }
        stGetError   = -5; { Get object error }
        stPutError   = -6; { Put object error }
        stSeekError  = -7; { Seek error in stream }
        stOpenError  = -8; { Error opening stream }

These constants can be passed to constructors of file streams:

     CONST
        stCreate    = $3C00; { Create new file }
        stOpenRead  = $3D00; { Read access only }
        stOpenWrite = $3D01; { Write access only }
        stOpen      = $3D02; { Read/write access }

The following constants are error codes, returned by the collection list objects:

     CONST
        coIndexError = -1; { Index out of range }
        coOverflow   = -2; { Overflow }

Maximum data sizes (used in determining how many data can be used.

     CONST
        MaxBytes = 128*1024*1024;                          { Maximum data size }
        MaxWords = MaxBytes DIV SizeOf(Word);              { Max word data size }
        MaxPtrs = MaxBytes DIV SizeOf(Pointer);            { Max ptr data size }
        MaxCollectionSize = MaxBytes DIV SizeOf(Pointer);  { Max collection size }

[next] [front] [up]