Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Using a Math oper. buried in a variable

From: gregg:pointillistic at: 2-Apr-2009 14:50

Hi Duke,
>>> num1
mgc> == 5
>>> num2
mgc> == 6
>>> op
mgc> == *
>>> do reform [num1 op num2]
mgc> == 30
>>>
mgc> Is it OK for me to think that this is a PITA? Sure, you can think whatever you want. :) How would you like it to work, and what is your ultimate goal? A big part of understanding REBOL is figuring out when evaluation occurs, and how values are evaluated. I almost never DO strings. 1) it's just non-REBOLish. REBOL is a data language, and you can almost always build up expressions to evaluate far easier using native types, and 2) it's a risky habit to get into, in case, one day, you write something that uses untrusted data. -- Gregg