lrc_BYTE

Example: lrc_BYTEType Conversion From String

Converts a string into a byte.

BYTE lrc_BYTE( const char* str ); 
char *lrc_BYTE_by_ref( const char* str ); 
strA character string containing an unsigned char (byte) in octal or hexadecimal representation.

The lrc_BYTE function converts a character string into an unsigned character (byte) numeric value.

The lrc_BYTE_by_ref function converts a character string into an unsigned character (byte) numeric value and returns a pointer to the byte.

To represent a value in octal notation, put a backslash in front of the string:

bVal = lrc_BYTE("\131");

To represent a value in hexadecimal notation, put a backslash and an "x" in front of the string:

bVal = lrc_BYTE("\x50");

If a character string is passed, the first character is converted:

lrc_BYTE("131"); Stores the character "1".

lrc_BYTE("Supercalifragilisticexpialidocious"); Stores the character "S".

The additional function lrc_BYTE_by_ref returns a reference to the byte and is used when the API or invocation function requires a pointer.

Return Values

lrc Return Values

Parameterization

You cannot use standard parameterization for any arguments in this function.