Download Now

    Reference Codebot.System.pas

    Part of the Codebot package

    The Codebot.System unit defines the types and routines used throughout the library. It declares Float, which is the floating point type used by the library, along with the other basic types and TArray. It also loads dynamic libraries and identifies which platform the program is running on.

    The unit includes the following:

    • TArrayList, an extension of dynamic arrays that can sort, search, and filter its items, and TStack, a fixed size stack, along with the compare and convert function types they use.
    • Math, time, string, and file management routines.
    • Helpers that add methods to strings, numbers, and TStrings.
    • Named values and named strings, which are simple dictionaries keyed by name.
    • Delegates, which publish an event to any number of subscribers, and TChangeNotifier, which notifies owners when something changes.
    • A null stream, which counts the bytes written to it without storing them.
    • Threading support, including mutexes, events, asynchronous tasks, TSimpleThread, and routines that wait.

    Finally, WriteLine writes formatted text to the console.

    Items 379 items

    NameKindLine
    Ceilfunction324
    Clampfunction334
    ConfigAppDirfunction750
    ConfigAppFilefunction748
    DegToRadfunction338
    DirChangeprocedure716
    DirCreatefunction714
    DirDeletefunction724
    DirExistsfunction726
    DirForcefunction728
    DirGetCurrentfunction718
    DirGetTempfunction722
    DirSetCurrentfunction720
    Dividefunction320
    EAsyncExceptionclass1198
    ELibraryExceptionclass84
    Createconstructor91
    ModuleNameproperty93
    ProcNameproperty96
    EStackErrorclass277
    EventCreatefunction1184
    faAnyFileconstant765
    faArchiveconstant763
    faDirectoryconstant762
    faHiddenconstant759
    faReadOnlyconstant758
    faSymLinkconstant764
    faSysFileconstant760
    faVolumeIdconstant761
    FileChangeExtfunction704
    FileDatefunction696
    FileDeletefunction686
    FileExistsfunction692
    FileExtractExtfunction702
    FileExtractNamefunction698
    FileExtractNameOnlyfunction700
    FileExtractPathfunction706
    FileReadStrfunction710
    FileRenamefunction690
    FileSizefunction694
    FileWriteLineprocedure712
    FileWriteStrprocedure708
    FillZeroprocedure115
    FindFileParamsprocedure753
    FindFilesprocedure771, 793
    FindOpenfunction768
    Floatalias25
    FloatToBytefunction336
    FloatToCommasfunction502
    FloatToStrfunction498, 500
    Floorfunction326
    GetPlatformfunction105
    HFilealias41
    HiByteconstant61
    HModulealias52
    IAsyncTaskinterface1206
    Cancelprocedure1217
    Waitprocedure1219
    Cancelledproperty1221
    Dataproperty1223
    Durationproperty1229
    Progressproperty1225
    StartTimeproperty1227
    Statusproperty1231
    ICloneableinterface135
    Clonefunction138
    IDelegateinterface963
    Addprocedure968
    GetIsEmptyfunction966
    Removeprocedure970
    IsEmptyproperty972
    IEventinterface1172
    Resetprocedure1174
    Signalprocedure1176
    Waitprocedure1178
    IFloatPropertyNotifyinterface1060
    PropChangeprocedure1063
    IMethodDelegatealias1038
    IMutexinterface1159
    Lockfunction1161
    Unlockfunction1163
    INamedStringsinterface898
    INamedValuesinterface863
    Addprocedure873
    Clearprocedure879
    Deleteprocedure877
    Removeprocedure875
    Countproperty881
    Emptyproperty883
    Namesproperty885
    ValueByIndexproperty889
    Valuesproperty887
    Infinityconstant315
    INotifyDelegatealias1032
    IntHelperhelper636
    Betweenfunction641
    ToStringfunction639
    IntPowerfunction342
    IntToStrfunction492
    IsMainThreadfunction1150
    IStopwatchinterface356
    Calculatefunction364
    Resetprocedure366
    Pausedproperty370
    Timeproperty368
    LargeIntalias29
    LargeWordalias33
    LibraryGetProcfunction76
    LibraryLoadfunction67
    LibraryUnloadfunction71
    LineBreakfunction389
    LineBreakStylesconstant384
    MemComparefunction1067
    ModuleNilconstant56
    Modulusfunction318
    MutexCreatefunction1182
    Nowfunction675
    NowTimeprocedure679
    PathAdjustDelimitersfunction730
    PathCombinefunction732
    PathExcludeDelimiterfunction738
    PathExpandfunction734
    PathIncludeDelimiterfunction736
    PFloatpointer27
    PLargeIntpointer31
    PLargeWordpointer35
    PSysIntpointer39
    PumpMessagesprocedure1302
    PumpMessagesProcvariable1298
    RadToDegfunction340
    Remainderfunction322
    ResLoadDatafunction742
    ResLoadTextfunction744
    ResSaveDatafunction746
    SharedSuffixconstant59
    SinCosprocedure330, 332
    Sleepprocedure1290
    StopwatchCreatefunction376
    StrAdjustLineBreaksfunction466, 468
    StrBeginsWithfunction446
    StrComparefunction402
    StrCompPathfunction512
    StrContainsfunction444
    StrCopyfunction395
    StrCopyDatafunction397
    StreamReadStrfunction740
    StrEndsWithfunction448
    StrEnvironmentVariablefunction508
    StrEqualsfunction420, 422
    StrFindfunction404, 406
    StrFindCountfunction408
    StrFindIndexfunction410
    StrFirstOffunction438
    StrFormatfunction510
    StrIndexfunction424
    StringHelperhelper521
    AdjustLineBreaksfunction619, 621
    ArrayIndexfunction574
    BeginsWithfunction601, 603
    Betweenfunction597
    CharIntoprocedure535
    Comparefunction546
    Containsfunction599
    Copyfunction552
    CopyIntoprocedure537
    EndsWithfunction605, 607
    Equalsfunction541, 543
    FirstOffunction591
    Formatfunction615
    IndexOffunction556, 558
    Insertfunction554
    InsertIntoprocedure539
    LastOffunction595
    LineBreakStylefunction617
    Linesfunction576
    LineWithfunction578
    MatchCountfunction560
    Matchesfunction562
    PadLeftfunction609
    PadRightfunction611
    Quotefunction613
    RemoveLastfunction564
    Replacefunction566
    ReplaceAfterfunction570
    ReplaceOnefunction568
    SecondOffunction593
    Splitfunction580
    SplitIntfunction582
    SplitInt64function584
    SplitTokensfunction586
    ToLowerfunction550
    ToStringfunction531
    ToUpperfunction548
    Trimfunction572
    Uniqueprocedure533
    Wordsfunction589
    IsAttributeproperty629
    IsEmptyproperty623
    IsIdentifierproperty627
    IsWhitespaceproperty625
    Lengthproperty631
    StrInsertfunction399
    StrIsAttrfunction462
    StrIsBlankfunction458
    StrIsIdentfunction460
    StrJoinfunction434
    StrJoinIntfunction436
    StrLastOffunction442
    StrLineBreakStylefunction464
    StrLowerfunction393
    StrOffunction450
    StrPadLeftfunction452
    StrPadRightfunction454
    StrQuotefunction456
    StrReplacefunction412
    StrReplaceAfterfunction416
    StrReplaceOnefunction414
    StrSecondOffunction440
    StrSplitfunction426
    StrSplitIntfunction428
    StrSplitInt64function430
    StrSplitTokensfunction432
    StrToBinfunction490
    StrToFloatfunction504
    StrToFloatDeffunction506
    StrToIntfunction494
    StrToIntDeffunction496
    StrToWidefunction470
    StrTrimfunction418
    StrUpperfunction391
    SwitchCharconstant386
    SwitchExistsfunction478
    SwitchIndexfunction483
    SwitchValuefunction488
    SysIntalias37
    Tanfunction328
    TArrayarray111
    TArrayListrecord164
    DefaultComparefield184
    DefaultConvertStringfield186
    Itemsfield188
    ArrayOffunction190
    Clearprocedure226
    Convertfunction192
    Copyprocedure200
    CopyFastprocedure202
    Deleteprocedure224
    Exchangeprocedure210
    Filterfunction220
    FirstOffunction222
    GetEnumeratorfunction169
    Hifunction206
    Implicitoperator194, 196, 198
    IndexOffunction230
    Joinfunction232
    Lofunction204
    Popfunction216
    PopRandomfunction218
    Pushprocedure212
    PushRangeprocedure214
    Reverseprocedure208
    Sortprocedure228
    Dataproperty242
    Firstproperty236
    IsEmptyproperty234
    Itemproperty244
    Lastproperty238
    Lengthproperty240
    TAsyncStatusenum1194
    asyncBusyenum value1194
    asyncSuccessenum value1194
    asyncFailenum value1194
    asyncCanceledenum value1194
    TChangeNotifierclass1044
    Changeprocedure1050
    OnChangeproperty1053
    TCompareprocedural121
    TConvertStringprocedural125
    TDateTimeHelperhelper646
    AddMinutesfunction651
    Dayfunction657
    Monthfunction655
    ToStringfunction649
    Yearfunction653
    TDelegaterecord1009
    Addprocedure1022
    GetEnumeratorfunction1018
    GetIsEmptyfunction1020
    Implicitoperator1016
    Removeprocedure1024
    IsEmptyproperty1026
    TFileSearchalias790
    TFileSearchHelperhelper798
    SortModifiedprocedure805
    SortNameprocedure801
    SortSizeprocedure803
    TFileSearchItemrecord776
    Attributesfield785
    Modifiedfield783
    Namefield779
    Sizefield781
    TFilterFuncprocedural129
    ThreadExecutefunction1278, 1282, 1286
    TimeQueryfunction348
    TInterfacedFreeclass942
    Componentfield952
    Createconstructor954
    Destroydestructor956
    ReleaseComponentprocedure949
    TMatrixOrderenum46
    moPrependenum value46
    moAppendenum value46
    TMethodDelegatealias1036
    TMethodEventprocedural1034
    TNamedEnumerablerecord851
    Enumeratorfield854
    GetEnumeratorfunction856
    TNamedStringsalias894
    TNamedStringsIntfclass928
    TNamedValuesrecord814
    Addprocedure828
    Clearprocedure834
    Deleteprocedure832
    GetEnumeratorfunction817
    HasNamefunction836
    Removeprocedure830
    Countproperty838
    Emptyproperty840
    Namesproperty842
    ValueByIndexproperty846
    Valuesproperty844
    TNamedValuesIntfclass906
    TNotifyDelegatealias1030
    TNullInfoclass1083
    Resetfunction1098
    Avergageproperty1104
    Bytesproperty1100
    Rateproperty1102
    Secondsproperty1106
    TNullResultalias1076
    TNullStreamclass1113
    Createconstructor1125
    Destroydestructor1127
    Readfunction1132
    Seekfunction1139
    Writefunction1137
    ReadInfoproperty1141
    WriteInfoproperty1143
    TPlatformenum101
    platformLinuxenum value101
    platformMacenum value101
    platformWindowsXPenum value101
    platformWindowsenum value101
    TSimpleThreadclass1246
    Createconstructor1259
    Executeprocedure1256
    Synchronizeprocedure1263
    Statusproperty1265
    Terminatedproperty1267
    TSortingOrderenum158
    soAscendenum value158
    soDescendenum value158
    soNoneenum value158
    TStackrecord284
    Createfunction296
    Popfunction300
    Pushprocedure298
    Firstproperty306
    Indexproperty304
    IsEmptyproperty302
    Lastproperty308
    TStringsHelperhelper662
    AddFormatprocedure667
    AddLineprocedure665
    Containsfunction670
    TThreadExecuteMethodprocedural1240
    TThreadExecuteProcprocedural1272
    WideToStrfunction472
    WriteDebugprocedure1307, 1309