Peter Van Roy wrote:
> Raphael Collet wrote:
>> Alan Oswald wrote:
>>
>>> The GetText function uses get($) as a text string. How do I get it
>>> as a number?
>>
>> Convert it: {String.toInt "42"} returns 42.
>
> A more powerful way is to compile it:
>
> I={Compiler.evalExpression "42" env _}
>
> This compiles the string as if you typed it as source code, and then
> evaluates the expression.
Unless there is a very good reason why this power is needed, the
String.toInt method should be used, since evaluating expressions from
potentially untrusted input will create security problems.
--
David Hopwood <[EMAIL PROTECTED]>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users