42 of 323
ZBasic System Library 32 ZX Microcontroller Family CBit Type Function returning Bit Invocation CBit(arg) Parameter Method Type Description arg ByVal integral, String or Boolean The value to convert to a Bit value. Discussion This function converts a numeric, String or Boolean value to a Bit value as described in the table below. Input Type Result integral, Boolean The value is the least significant bit of the supplied value. String The result is the least significant bit of the numeric value of the characters in the string, ignoring leading space and tab characters. The value string may begin with a plus or minus sign and an optional radix indicator (&H for hexadecimal, &O for octal, &B or &X for binary, all case insensitive). The conversion is terminated upon reaching the end of the string or encountering the first character that is not valid for the indicated radix. Example Dim pinVal as Bit pinVal = CBit(GetPin(12)) Compatibility This function is not available in BasicX compatibility mode.