You're right - I copied the code out too hastily. The error you encountered is caused by the fact that "Val" is not internationally aware...fortunately the same oversight means that "Str$" isn't either so:

? val(str(val("1.23ab")))
1,23
? val(format$(val("1.23ab")))
1