[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 3.3 Compiler and RTS Built-in Declarations

- Syntax:

  - New operators ``is'` and ``as'` for objects
  - ``shl'` and ``shr'` can also be used as procedures now.
  - ``mod'` with negative right operand now works like in BP. (B)
  - Expressions like ``-2 * +3'` are now allowed without parentheses. (B)
  - The alternative address operator ``&'` was removed. (``@'` is still there.) (@)
  - ``register'` directive
  - ``asmname'` and ``uses ... in'` now allow concatenated strings
  - ``asmname'` for programs, units and module interfaces
  - Directives with double underscores like ``__asmname__'`, ``__inline__'` have been dropped. The same directives without underscores have been available for a long time. Furthermore, GPC now supports ``^const'` to create a pointer to a constant (which could be done in a C like fashion with the ``__const__'` directive before). (@)

- Types:

  - Abstract methods and object types
  - PObjectType with fields ``Size'`, ``NegatedSize'`, ``Parent'` and ``Name'`, returned by ``TypeOf'` and required by ``SetType'`
  - ByteBool, ShortBool, WordBool, MedBool, LongBool, LongestBool, Boolean(42) (D?)
  - Type qualifiers like ``__byte__'` or ``__unsigned__'` have been dropped. GPC has been supporting "real" type names like ``Byte'` or ``ByteWord'` for a long time, and it's easy to change to them. Similar for ``__cstring__'` and ``__void__'` where ``CString'` and ``Void'` are available. (@)
  - ``nil'` is accepted as a value of any procedural/functional type (B)

Some of the following declarations are built into the compiler, others are declared in the ``GPC'` module.

- Files and I/O:

  - SeekEOF, SeekEOLn (B)
  - IOErrorFile
  - New parameter ``ElementSize'` to ReverseBytes, ConvertFromLittleEndian, ConvertFromBigEndian, ConvertToLittleEndian, ConvertToBigEndian, BlockReadLittleEndian, BlockReadBigEndian, BlockWriteLittleEndian, BlockWriteBigEndian (@)
  - ReadStringLittleEndian
  - ReadStringBigEndian
  - WriteStringLittleEndian
  - WriteStringBigEndian
  - GetTempFileNameInDirectory
  - PathExists
  - DataDirectoryName
  - AssignBinary
  - HasWildCardsOrBraces
  - BraceExpand
  - MultiFileNameMatch
  - GlobOn
  - MultiGlob
  - MultiGlobOn
  - QuoteFileName
  - UnQuoteFileName
  - ReadLink
  - FExpandQuoted
  - ForceAddDirSeparator
  - FindNonQuotedChar
  - FindNonQuotedStr
  - NameExtFromPath
  - SystemInfo
  - GetMountPoint
  - FileMove
  - ChMod
  - ChOwn
  - IOSelect
  - IOSelectRead
  - FileNameLoCase
  - FileNamesCaseSensitive (constant)
  - DirRoot (constant)
  - MaskNoStdDir (constant)
  - QuotingCharacter (constant)
  - EnvVarChars (constant)
  - EnvVarCharsFirst (constant)
  - WildCardChars (constant)
  - FileNameSpecialChars (constant)
  - ShellExecCommand (constant)
  - DataReady renamed to CanRead (@)
  - FileLock, FileUnlock
  - MemoryMap, MemoryUnMap
  - RuntimeErrorErrNo
  - InOutResCErrorString
  - CStringStrError
  - ``StatFS'` is now a function rather than a procedure. (@)
  - ``InOutResStr'` was renamed to ``InOutResString'`, is now a ``PString'` rather than a ``CString'`, and is now in the ``GPC'` module rather than built into the compiler. (@)
  - New parameter ``ErrNoFlag'` to ``IOError'`, ``IOErrorInteger'`, ``IOErrorCString'` and ``IOErrorFile'` (@)
  - New parameter ``Quoted'` to RelativePath (@)
  - New parameter ``Prefix'` to ConfigFileName (@)
  - New parameter ``AccessTime'` to SetFileName (@)
  - ExpandEnvironment recognizes ``~user'`
  - Each of the parameters ``Dir'`, ``Name'` and ``Ext'` to ``FSplit'` may now be ``Null'`.
  - New fields ``User'`, ``Group'`, ``Mode'`, ``Device'`, ``INode'`, ``Links'`, ``SymLink'`, ``TextBinary'` and ``Special'`, ``CloseFlag'` in ``BindingType'`
  - The variable ``TextFilesBinary'` has been dropped. Instead, you can now use the procedure ``AssignBinary'` or the field ``TextBinary'` in ``BindingType'`. (@)
  - File sizes can now be bigger than ``Integer'` (e.g. 64 bit files on 32 bit machines) if supported by the OS via lseek64() or llseek() (e.g. Linux, Solaris, IRIX).
  - Renamed the file mode constants from ``fmfoo'` to ``fm_foo'`. (@)
  - ``GetIOErrorMessage'` now returns a string rather than a ``CString'`. (@)
  - In ``GlobBuffer'`, the fields ``Count'` and ``Result'` (pointer to an array of ``CString'`s, 0 baser) were replaced by ``Result'`, a pointer to an array of pointers to strings, 1 based). (@)

- Strings:

  - FormatString
  - FormatStringTransformPtr
  - Integer2String
  - IsUpCase
  - IsLoCase
  - IsAlpha
  - IsAlphaNum
  - IsAlphaNumUnderscore
  - IsSpace
  - IsPrintable
  - Renamed the CString routines in the RTS so they get a ``CString'` prefix, moved the BP compatibility identifiers for the same routines into the ``Strings'` unit (B) (@)
  - MemCompCase
  - StrEqualCase
  - PosCase
  - LastPosCase
  - PosFromCase
  - LastPosTillCase
  - IsPrefixCase
  - IsSuffixCase
  - LTrim (VS/Pascal compatibility :-)
  - LineBreak (constant)
  - SetEnv (makes obsolete libc's PutEnv (@))
  - UnSetEnv
  - GetCEnvironment
  - DisposePPStrings
  - ``SetLength'` does not require extended syntax anymore.
  - The environment variable management is now implemented in Pascal, so it's independent of libc differences (e.g. the presence or not of ``environ'`). Access via ``GetEnv'` etc. works unchanged.
  - The ``Environment'` variable is now a schema which contains the environment variables as CStrings. (@)
  - Empty and case-sensitive environment variables are allowed within GPC programs even under Dos.

- Random:

  - SeedRandom
  - SeedRandomPtr (variable)
  - Randomize is called automatically when necessary (except when using the BP compatible random number generator in the System unit (B)).

- Memory:

  - ReAlloc; previous ReAlloc function (libc) renamed to CReAlloc (@)
  - ReAllocPtr (variable)
  - ForEachMarkedBlock
  - AllocateBigMem, DisposeBigMem, MoveToBigMem, MoveFromBigMem, MapBigMem for uniform access to big memory blocks for GPC and BP (B)

- Time:

  - Sleep
  - SleepMicroSeconds
  - Alarm
  - GetCPUTime
  - GetMicroSecondTime
  - GetDayOfWeek
  - GetDayOfYear
  - GetSundayWeekOfYear
  - GetMondayWeekOfYear
  - GetISOWeekOfYear
  - FormatTime
  - The constant ``MonthLength'` was replaced by a function of the same name that handles leap years. (@)
  - DayOfWeekName (constant)
  - InvalidYear (constant)
  - New parameters ``TimeZone'`, ``DST'`, ``TZName1'`, ``TZName2'` to ``UnixTimeToTime'` (@)
  - New fields ``TimeZone'`, ``DST'`, ``TZName1'`, ``TZName2'` in ``TimeStamp'`

- Misc:

  - Include and Exclude for sets (B)
  - InitProc (D)
  - Initialize (D)
  - Finalize (D)
  - IsInfinity
  - IsNotANumber
  - SplitReal
  - Ln1Plus
  - ReturnAddress
  - FrameAddress
  - Runtime errors are now printed with their address to help debugging (using addr2line), and the address is stored in ErrorAddr. (B)
  - RegisterRestoreTerminal
  - UnregisterRestoreTerminal
  - RestoreTerminal
  - ExecuteNoTerminal
  - SetProcessGroup
  - SetTerminalProcessGroup
  - GetTerminalProcessGroup
  - IsTerminal
  - GetTerminalName
  - SetInputSignals
  - GetInputSignals
  - GetShellPath
  - GetPasswordEntryByName
  - GetPasswordEntryByUID
  - GetPasswordEntries
  - StrSignal
  - Kill
  - WaitPID
  - InstallSignalHandler
  - BlockSignal
  - SignalBlocked
  - Constants for the signals
  - UserID
  - GroupID
  - IllReservedAddress, IllPriviledgedInstruction, IllReservedOp were removed. (@)

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html