You are correct, 1.0 is atomatically casted as a number. Because of that you get "Type mismatch" error. A simple workaround is to prefix strings with some text character before doing the comparision, for example Concat "a", value, value IsEqual value, "aX", ok : Executing this script: Dim value, string : Dim ok, boolean : Set value, "1.0" : IsEqual value, "X", ok : Exit : I obtain a "Type mismatch" error on the "IsEqual" : statement. : I suppose that this statement "thinks" that "value" is a : number because it has a numeric value. : How can I check a string variable that could have a numeric value? : Any ideas?
|