Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: String Hex IsHex Hexadecimal ChrHexToString StrTypeInfo
However, my first thought is to use the ChrHexToString function to handle the hex validation. Here is an undebugged code sample:
#DefineFunction IsHex (value) ErrorMode(@OFF) ChrHexToString(value) ErrorMode(@CANCEL) If LastError() == 0 Then result = 1 Else result = 0 Return result #EndFunction value = '48656C6C6F' ;returns 1 ;value = '48656C6CF' ;returns 0 ;value = '48' ;returns 1 ;value = '4' ;returns 0 ;value = '?' ;returns 0 ret = IsHex (value) Pause('IsHex?',ret) Exit
Also, perhaps look at command StrTypeInfo and flag 128 (C1_XDIGIT) Hexadecimal digits.
Article ID: W18288
Filename: Determine Hex String.txt
File Created: 2013:03:25:11:38:50
Last Updated: 2013:03:25:11:38:50