isNumber returns true in the twenty instances of <decimal digit> <"d" or "f"> ("3d" or "5f" for example). It does not seem to respond to other hexidecimal numbers and these numbers are treated as strings by the default addition process.
The following should illustrate the issue by producing the output "1d1d".
Code: Select all
[h:test_string="1d"]
[r,if(isNumber(test_string)):test_string+test_string]
Code: Select all
[previous=0]
[h,while(1):abort(input("previous|"+previous+"|"+isNumber(previous)))]
The following resulted in isNumber possessing the appropriate value.
Code: Select all
[H: value = "1d"]
[H: isNumber = 0]
[H, if(isNumber(value)), code: {
[H: valCheck = replace(value,"^[0-9]","")]
[H, if(value == valCheck): isNumber = 1]
};{}]