alias num {
if ($1 isnum) {
var %d = $iif($count($1,.) == 1,1,0)
if (!$prop && %s) { return $true }
if ($prop == int && !%d) { return $true }
if ($prop == dec && %d) { return $true }
}
elseif ($prop == hex && $regex($1,/^[0-9a-f]+$/i)) { return $true }
return $false
}
$num(), returns $true if: The first param is a number/decimal.
$num().int, returns $true if the first param is an INT.
$num().dec, returns $true if there is a decimal, and only one decimal.
$num().hex, returns $true if the characters stay between 0 and F.
Note: It's false if there's two decimals. This is just an example of how you could check for these.