LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

EVAL() function?

Root / General / [.]

chickenCreated:
Who wants a EVAL(code) function to evaluate code/run it? This could make programming tutorials, in-depth OS's, and much, much more possible/easier. I WANTZ DIS

How is this any better than using multiple slots and the existing metaprogramming? Honestly, I don't see how it makes any of those things possible or easier. I would not use EVAL for an OS, as you want to be able to switch the processing context without throwing it out, e.g. slots...
DEF EVAL code
  PRGEDIT 3
  PRGDEL -1
  PRGINS code
  EXEC 3
END
DEF EVAL(code)
  PRGEDIT 3
  PRGDEL -1
  PRGINS "COMMON DEF ___do()"
  PRGINS "RETURN " + code
  PRGINS "END"
  USE 3
  RETURN ___do()
END