The following general-purpose types are defined:
tfilename = string; tsyscharset = set of char; tintegerset = set of 0..sizeof(integer)*8-1; longrec = packed record lo,hi : word; end; wordrec = packed record lo,hi : byte; end; TMethod = packed record Code, Data: Pointer; end; |
The following general-purpose constants are defined:
const SecsPerDay = 24 * 60 * 60; // Seconds and milliseconds per day MSecsPerDay = SecsPerDay * 1000; DateDelta = 693594; // Days between 1/1/0001 and 12/31/1899 Eoln = #10; |
type TSystemTime = record Year, Month, Day: word; Hour, Minute, Second, MilliSecond: word; end ; TDateTime = double; TTimeStamp = record Time: integer; { Number of milliseconds since midnight } Date: integer; { One plus number of days since 1/1/0001 } end ; |
Type THandle = Longint; TSearchRec = Record Time,Size, Attr : Longint; Name : TFileName; ExcludeAttr : Longint; FindHandle : THandle; {$ifdef Win32} FindData : TWin32FindData; {$endif} end; |
Const faReadOnly = $00000001; faHidden = $00000002; faSysFile = $00000004; faVolumeId = $00000008; faDirectory = $00000010; faArchive = $00000020; faAnyFile = $0000003f; |
Const fmOpenRead = $0000; fmOpenWrite = $0001; fmOpenReadWrite = $0002; |
Const fsFromBeginning = 0; fsFromCurrent = 1; fsFromEnd = 2; |
type TCaseTranslationTable = array[0..255] of char; var UpperCaseTable: TCaseTranslationTable; LowerCaseTable: TCaseTranslationTable; |
The following constants control the formatting of dates. For the Win32 version of the sysutils unit, these constants are set according to the internationalization settings of Windows by the initialization code of the unit.
Const DateSeparator: char = '-'; ShortDateFormat: string = 'd/m/y'; LongDateFormat: string = 'dd" "mmmm" "yyyy'; ShortMonthNames: array[1..12] of string[128] = ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); LongMonthNames: array[1..12] of string[128] = ('January','February','March','April', 'May','June','July','August', 'September','October','November','December'); ShortDayNames: array[1..7] of string[128] = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); LongDayNames: array[1..7] of string[128] = ('Sunday','Monday','Tuesday','Wednesday', 'Thursday','Friday','Saturday'); |
The following constants control the formatting of times. For the Win32 version of the sysutils unit, these constants are set according to the internationalization settings of Windows by the initialization code of the unit.
Const ShortTimeFormat: string = 'hh:nn'; LongTimeFormat: string = 'hh:nn:ss'; TimeSeparator: char = ':'; TimeAMString: string[7] = 'AM'; TimePMString: string[7] = 'PM'; |
The following constants control the formatting of currencies and numbers. For the Win32 version of the sysutils unit, these constants are set according to the internationalization settings of Windows by the initialization code of the unit.
Const DecimalSeparator : Char = '.'; ThousandSeparator : Char = ','; CurrencyDecimals : Byte = 2; CurrencyString : String[7] = '$'; { Format to use when formatting currency : 0 = $1 1 = 1$ 2 = $ 1 3 = 1 $ 4 = Currency string replaces decimal indicator. e.g. 1$50 } CurrencyFormat : Byte = 1; { Same as above, only for negative currencies: 0 = ($1) 1 = -$1 2 = $-1 3 = $1- 4 = (1$) 5 = -1$ 6 = 1-$ 7 = 1$- 8 = -1 $ 9 = -$ 1 10 = $ 1- } NegCurrFormat : Byte = 5; |
type PString = ^String; TFloatFormat = (ffGeneral, ffExponent, ffFixed, ffNumber, ffCurrency); |
Const DirSeparators : set of char = ['/','\']; {$ifdef unix} OSDirSeparator = '/'; {$else} OsDirSeparator = '\'; {$endif} |