Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== GetBinaryValue Function ====== ==== Description ==== Returns the value of a variable at a given offset. ==== Syntax ==== val = GetBinaryValue( variable, offset, varType [, varSize] ==== Parameters ==== The function has the following parameters: ^Parameter^Description^ |variable|A binary structure to return data from.| |offset|The starting offset of the data to be extracted| |varType|The type of data within the variable, i.e., CHAR, INT, BINARY| |varSize|An optional parameter. This should be set the byte size of the data to be returned. This argument is only required if varType is CHAR or BINARY.|| ==== Returns ==== A binary value based on the offset, type and size. ==== See Also ==== [[ansi_unicode|ANSI_Unicode()]], [[unicode_ansi|Unicode_ANSI()]], [[getbytesize|GetByteSize()]] ==== Example ==== <code> /* This example takes the following steps: 1. Converts an ANSI string to UNICODE 2. Determines the length of the string 3. Extracts the first 10 characters from the string 4. Converts the UNICODE string to ANSI */ ansi_string = "Hello World" * Convert the string to Unicode unicode_string = ANSI_Unicode( ansi_string : \00\ ) uniLength = GetByteSize( unicode_string ) val = GetBinaryValue( unicode_string, 1, CHAR, 10 ) newString = Unicode_ANSI( val ) </code> guides/programming/programmers_reference_manual/getbinaryvalue.txt Last modified: 2024/06/19 20:20by 127.0.0.1