: That is not a solution. He clearly wants to work with string
. If you do
, then you got variable named "string" containing boolean value. There would be no point in converting it to boolean if it already is boolean.
If you really require it to work with "true" and "false" strings, you can use condition:
local string "true";local boolean (string="true");put [typeof $boolean];put [$boolean]
I am not quite sure why your code does not work, but it seems that
is really broken. I tried to use as parameter true/false, yes/no, 1/0 (both string or integer) and it does not produce any result. I can't figure out what possible input I need to use in order to get boolean result.
On the other hand, my proposed solution is actually shorter than your original idea - I guess no reason to use this conversion command at all.