Library index

The standard library is written in x itself, in runtime/runtime.pb. It is compiled together with each program, and only the procedures the program uses end up in the executable.

Names and arguments follow PureBasic, so PureBasic programs work unchanged.

Function Library Status
Abs Math ✅
ACos Math ✅
ACosH Math ✅
AddCipherBuffer Cipher ✅
AddDate Date ✅
AddElement List ✅
AddFingerprintBuffer Cipher ✅
AddMapElement Map ✅
AESDecoder Cipher ✅
AESEncoder Cipher ✅
AllocateMemory Memory ✅
AllocateStructure Memory ✅
AndBits Array (x addition) ✅
ArraySize Array 🟡
Asc String ✅
Ascii String ✅
ASin Math ✅
ASinH Math ✅
ATan Math ✅
ATan2 Math ✅
ATanH Math ✅
AvailableProgramOutput Process ✅
Await, AwaitD, AwaitS, TaskDone Tasks (x addition) ✅
Base64Decoder Cipher ✅
Base64DecoderBuffer Cipher ✅
Base64Encoder Cipher ✅
Base64EncoderBuffer Cipher ✅
Bin String ✅
BitCount Array (x addition) ✅
ChangeCurrentElement List ✅
ChannelSize Channels (x addition) ✅
CheckFilename File system ✅
Chr String ✅
ClearConsole Console ✅
ClearList List ✅
ClearMap Map ✅
ClearStructure Memory ✅
CloseChannel Channels (x addition) ✅
CloseConsole Console ✅
CloseCryptRandom Cipher ✅
CloseFile File ✅
ClosePreferences Preference ✅
CloseProgram Process ✅
CompareList List ✅
CompareMap Map ✅
CompareMemory Memory ✅
ConsoleColor Console ✅
ConsoleCursor Console ✅
ConsoleError Console ✅
ConsoleLocate Console ✅
ConsoleTitle Console ✅
ConvertDate Date ✅
CopyArray Array ✅
CopyDirectory File system ✅
CopyFile File system ✅
CopyList List ✅
CopyMap Map ✅
CopyMemory Memory ✅
CopyStructure Memory ✅
Cos Math ✅
CosH Math ✅
CountProgramParameters Process ✅
CountRegularExpressionGroups Regular expression ✅
CountString String ✅
CreateDirectory File system ✅
CreateFile File ✅
CreateMutex Thread ✅
CreatePasswordHash Cipher ✅
CreatePreferences Preference ✅
CreateRegularExpression Regular expression ✅
CreateSemaphore Thread ✅
CreateThread Thread ✅
CryptRandom Cipher ✅
CryptRandomData Cipher ✅
CustomSortArray Sort ✅
CustomSortList Sort ✅
Date Date ✅
DateUTC Date ✅
Day Date ✅
DayOfWeek Date ✅
DayOfYear Date ✅
DaysInMonth Date (x addition) ✅
Degree Math ✅
Delay Time ✅
DeleteDirectory File system ✅
DeleteElement List ✅
DeleteFile File system ✅
DeleteMapElement Map ✅
DeriveCipherKey Cipher ✅
DESFingerprint Cipher ✅
DirectoryEntryAttributes File system ✅
DirectoryEntryDate File system ✅
DirectoryEntryName File system ✅
DirectoryEntrySize File system ✅
DirectoryEntryType File system ✅
ElapsedMilliseconds Time ✅
EnableGraphicalConsole Console ✅
EndsWith String (x addition) ✅
EnvironmentVariableName Process ✅
EnvironmentVariableValue Process ✅
Eof File ✅
EscapeRegularExpression Regular expression (x addition) ✅
EscapeString String ✅
ExamineDirectory File system ✅
ExamineEnvironmentVariables Process ✅
ExaminePreferenceGroups Preference ✅
ExaminePreferenceKeys Preference ✅
ExamineRegularExpression Regular expression ✅
Exp Math ✅
ExtractRegularExpression Regular expression ✅
FileBuffersSize File ✅
FileFingerprint Cipher ✅
FileID File ✅
FileSeek File ✅
FileSize File system ✅
FillBits Array (x addition) ✅
FillMemory Memory 🟡
FindMapElement Map ✅
FindString String ✅
Fingerprint Cipher ✅
FinishCipher Cipher ✅
FinishDirectory File system ✅
FinishFingerprint Cipher ✅
FirstBit Array (x addition) ✅
FirstClearBit Array (x addition) ✅
FirstElement List ✅
FlushFileBuffers File ✅
FlushPreferenceBuffers Preference ✅
FormatDate Date ✅
FormatNumber String ✅
FreeArray Array ✅
FreeList List ✅
FreeMap Map ✅
FreeMemory Memory ✅
FreeMutex Thread ✅
FreeObject Classes (x addition) ✅
FreeRegularExpression Regular expression ✅
FreeSemaphore Thread ✅
FreeStructure Memory ✅
GetCurrentDirectory File system ✅
GetEnvironmentVariable Process ✅
GetExtensionPart File system ✅
GetFileAttributes File system ✅
GetFileDate File system ✅
GetFilePart File system ✅
GetHomeDirectory File system ✅
GetPathPart File system ✅
GetTemporaryDirectory File system ✅
GetUserDirectory File system ✅
Hex String ✅
Hour Date ✅
Infinity Math ✅
InitializeStructure Memory ✅
Inkey Console ✅
Input Console ✅
InsertElement List ✅
InsertString String ✅
Int Math ✅
IntQ Math ✅
IsCipher Cipher ✅
IsDirectory File system ✅
IsFile File ✅
IsFingerprint Cipher ✅
IsInfinity Math ✅
IsLeapYear Date (x addition) ✅
IsNaN Math ✅
IsProgram Process ✅
IsRegularExpression Regular expression ✅
IsThread Thread ✅
KillProgram Process ✅
LastElement List ✅
LCase String ✅
Left String ✅
Len String ✅
ListIndex List ✅
ListSize List ✅
Loc File ✅
LockMutex Thread ✅
Lof File ✅
Log Math ✅
Log10 Math ✅
LSet String ✅
LTrim String ✅
MapKey Map ✅
MapSize Map ✅
MatchRegularExpression Regular expression ✅
MemorySize Memory ✅
MemoryStringLength Memory ✅
MergeLists List ✅
Mid String ✅
Minute Date ✅
Mod Math ✅
Month Date ✅
MoveElement List ✅
MoveMemory Memory ✅
NaN Math ✅
NextDirectoryEntry File system ✅
NextElement List ✅
NextEnvironmentVariable Process ✅
NextMapElement Map ✅
NextPreferenceGroup Preference ✅
NextPreferenceKey Preference ✅
NextRegularExpressionMatch Regular expression ✅
NotBits Array (x addition) ✅
OpenConsole Console 🟡
OpenCryptRandom Cipher ✅
OpenFile File ✅
OpenPreferences Preference ✅
OrBits Array (x addition) ✅
ParallelWorkers Thread (x addition) ✅
ParseDate Date ✅
Peek / Poke family Memory 🟡
PeekS Memory ✅
PokeS Memory ✅
PopListPosition List ✅
PopMapPosition Map ✅
Pow Math ✅
PreferenceComment Preference ✅
PreferenceGroup Preference ✅
PreferenceGroupName Preference ✅
PreferenceKeyExists Preference (x addition) ✅
PreferenceKeyName Preference ✅
PreferenceKeyValue Preference ✅
PreviousElement List ✅
Print Console ✅
PrintN Console ✅
ProgramExitCode Process ✅
ProgramFilename Process ✅
ProgramID Process ✅
ProgramOutput Process (x addition) ✅
ProgramParameter Process ✅
ProgramRunning Process ✅
PushListPosition List ✅
PushMapPosition Map ✅
Radian Math ✅
Random Math ✅
RandomData Math ✅
RandomizeArray Sort ✅
RandomizeList Sort ✅
RandomSeed Math ✅
RawKey Console ✅
ReadByte / WriteByte … File ✅
ReadCharacter File ✅
ReadConsoleData Console ✅
ReadData File ✅
ReadFile File ✅
ReadPreferenceDouble Preference ✅
ReadPreferenceFloat Preference ✅
ReadPreferenceInteger Preference ✅
ReadPreferenceLong Preference ✅
ReadPreferenceQuad Preference ✅
ReadPreferenceString Preference ✅
ReadProgramData Process ✅
ReadProgramError Process ✅
ReadProgramString Process ✅
ReadString File ✅
ReadStringFormat File ✅
ReAllocateMemory Memory ✅
ReceiveChannel Channels (x addition) ✅
RegularExpressionError Regular expression ✅
RegularExpressionGroup Regular expression ✅
RegularExpressionGroupLength Regular expression ✅
RegularExpressionGroupPosition Regular expression ✅
RegularExpressionMatchLength Regular expression ✅
RegularExpressionMatchPosition Regular expression ✅
RegularExpressionMatchString Regular expression ✅
RegularExpressionNamedGroup Regular expression ✅
RegularExpressionNamedGroupLength Regular expression ✅
RegularExpressionNamedGroupPosition Regular expression ✅
RemoveEnvironmentVariable Process ✅
RemovePreferenceGroup Preference ✅
RemovePreferenceKey Preference ✅
RemoveString String ✅
RenameFile File system ✅
ReplaceRegularExpression Regular expression ✅
ReplaceRegularExpressionGroups Regular expression (x addition) ✅
ReplaceString String ✅
ResetList List ✅
ResetMap Map ✅
ResetStructure Memory ✅
ReverseString String ✅
Right String ✅
Round Math ✅
RSet String ✅
RTrim String ✅
RunProgram Process ✅
Second Date ✅
SelectElement List ✅
SendChannel Channels (x addition) ✅
SetCurrentDirectory File system ✅
SetEnvironmentVariable Process ✅
SetFileAttributes File system ✅
SetFileDate File system ✅
Sign Math ✅
SignalSemaphore Thread ✅
Sin Math ✅
SinH Math ✅
SortArray Sort ✅
SortList Sort ✅
SortStructuredArray Sort ✅
SortStructuredList Sort ✅
Space String ✅
SplitList List ✅
SplitRegularExpression Regular expression (x addition) ✅
Sqr Math ✅
StartAESCipher Cipher ✅
StartFingerprint Cipher ✅
StartsWith String (x addition) ✅
Str String ✅
StrD String ✅
StrF String ✅
StringBase64Decoder Cipher (x addition) ✅
StringBase64Encoder Cipher (x addition) ✅
StringByteLength String ✅
StringField String ✅
StringFingerprint Cipher ✅
StrU String ✅
SwapElements List ✅
Tan Math ✅
TanH Math ✅
ThreadID Thread ✅
Trim String ✅
TruncateFile File ✅
TryLockMutex Thread ✅
TrySemaphore Thread ✅
UCase String ✅
UnescapeString String ✅
Unicode String ✅
UnlockMutex Thread ✅
UseCRC32Fingerprint Cipher ✅
UseMD5Fingerprint Cipher ✅
UseSHA1Fingerprint Cipher ✅
UseSHA2Fingerprint Cipher ✅
UseSHA3Fingerprint Cipher ✅
UTF8 String ✅
Val String ✅
ValD String ✅
ValF String ✅
VerifyPasswordHash Cipher ✅
WaitProgram Process ✅
WaitSemaphore Thread ✅
WaitThread Thread ✅
WeekOfYear Date (x addition) ✅
WriteAsciiCharacter File ✅
WriteCharacter File ✅
WriteConsoleData Console ✅
WriteData File ✅
WritePreferenceDouble Preference ✅
WritePreferenceFloat Preference ✅
WritePreferenceInteger Preference ✅
WritePreferenceLong Preference ✅
WritePreferenceQuad Preference ✅
WritePreferenceString Preference ✅
WriteProgramData Process ✅
WriteProgramString Process ✅
WriteProgramStringN Process ✅
WriteString File ✅
WriteStringFormat File ✅
WriteStringN File ✅
WriteUnicodeCharacter File ✅
XorBits Array (x addition) ✅
Year Date ✅

Compiler functions such as SizeOf and Bool are on their own page.

Adding a library function

  1. Write the procedure in runtime/runtime.pb, with the same name and arguments as PureBasic's.
  2. Add its entry to the library's page here, following the pattern in the docs README, with an example that runs.
  3. Add it to the table above.
  4. Run tools\check_docs.ps1 to check that every example still compiles and prints what the page says.