11 of 307
ZBasic System Library 1 ZX Microcontroller Family System Library Reference Routines by Category The ZBasic System Library provides a rich collection comprising hundreds of subroutines and functions that you can use to add functionality to your application. The routines may be divided into several conceptual categories as shown below. Type Conversion Functions CBit() convert a value to type Bit CBool() convert a value to type Boolean CByte() convert a value to type Byte CByteArray() convert an integral value to a reference to a Byte array CInt() convert a value to type Integer CLng() convert a value to type Long CNibble() convert a value to type Nibble CSng() convert a value to type Single CStr() convert a value to type String CStrHex() convert a value to a String containing hexadecimal characters CType() convert a value to an enumeration member CUInt() convert a value to type UnsignedInteger CULng() convert a value to type Long FixB() convert a Single value to type Byte FixI() convert a Single value to type Integer FixL() convert a Single value to type Long FixUI() convert a Single value to type UnsignedInteger FixUL() convert a Single value to type UnsignedLong To<enum>() convert a value to an enumeration member Mathematical Functions Abs() absolute value Acos() arc cosine Asin() arc sine Atn() arc tangent Atn2() arc tangent (quadrant-correct) Ceiling() largest integer not greater than a Single value Cos() cosine DegToRad() convert degrees to radians Exp() e x Exp10() 10 x Fix() integer portion of a Single value Floor() smallest integer not less than a Single value Fraction() fractional portion of a Single value Log() natural logarithm Log10() common logarithm Max() determine the largest of two values Min() determine the smallest of two values Pow() raise a value to a power RadToDeg() convert radians to degrees Signum() determine if a value is negative, zero or positive Sin() sine SngClass() return the class information for a Single value Sqr() square root Tan() tangent