Seiki Batch Script > Mathematical Functions

hex

Returns an integer number from a hexadecimal string

Class: Mathematical

Parameters: $string – A string value representing the hexadecimal value

Syntax: returnValue=hex($string)

Returns: An integer number

Remarks: hex is the reverse of $hex

Example:

//Example for the mathematical hex method

$s=”OA” //Set string value

result=hex($s) //Calculate result (= 10)

message(“Hexadecimal value “ + $s “ is“ + result + “ in Decimal”) //Display results message