Runtime evaluation: Difference between revisions

Content added Content deleted
No edit summary
Line 1,068: Line 1,068:


=={{header|Nanoquery}}==
=={{header|Nanoquery}}==
The exec() function runs code contained within a string as if it were being read from a batch file, so any valid code may be run.
The exec() function runs code contained within a string as if it were being read from a file, so any valid code may be run.
<lang nanoquery>exec("println \"hello, world\"")
<lang nanoquery>exec("println \"hello, world\"")
exec("a = 1\nif a = 1\nprintln \"a is 1\"\nend\nprintln \"test\"")</lang>
exec("a = 1\nif a = 1\nprintln \"a is 1\"\nend\nprintln \"test\"")</lang>