en:software:qview:qview_6:qcl_library:vr10asctosby

This translation is older than the original page and might be outdated. See what has changed.

VR10AscToSBy

V = Variables

R = Reading functions

ASCII —→ SIGNED BYTE

The VR10AscToSBy function converts an Ascii variable type in an Signed Byte type (byte with sign).

VR10AscToSBy (array, index, return, errcode)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRGBL array B Array containing the data to be converted (must be declared with at least “index + 1” items)
IN GLOBAL index L Index of the array element at the beginning of the data
OUT GLOBAL return B Data value converted
OUT GLOBAL errcode F Variable that indicates a possible error on function

After calling the function, 'errcode' can take certain values, the meaning of these values is summarized below:
0: No error
1: Error: ASCII value is not within 48÷57 or 65÷70

Example

Transforms the value -5 (ASCII) in an signed byte value

index = 1
array[1] = 49
array[2] = 52
 
VR10AscToSBy (array, index, return, errcode)
 
;On the return data you will find :
; return = 20    (14H)

Note

  • Last modified: 2019/08/29 17:01