58 of 307
ZBasic System Library 48 ZX Microcontroller Family CNibble Type Function returning Nibble Invocation CNibble(arg) Parameter Method Type Description arg ByVal integral, String or Boolean The value to convert to a Nibble value. Discussion This function converts a numeric, String or Boolean value to a Nibble value as described in the table below. Input Type Result integral, Boolean The value is the four least significant bits of the supplied value. String The result is the four least significant bits 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 nVal as Nibble nVal = CNibble(Register.PortC) Compatibility This function is not available in BasicX compatibility mode.