Including comments in an evaluated NewScript()What would be the easiest way to include comments in an script that is written when executed?
dt = CurrentDataTable();
mystring = "Hello world!";
mylist = {"A", "B", "C"};
Eval(EvalExpr(dt << NewScript( "test",
// This comment will not appear in the new script as it is inside the Eval(EvalExpr())
mystring = Expr(mystring);
mylist = Expr(mylist);
)));
// JSL output
// mystring = "Hello world!";
// mylist = {"A", "B", "C"};ScriptingRe: Including comments in an evaluated NewScript()Here is how I would do it
dt = CurrentDataTable();
mystring = "Hello world!";
mylist = {"A", "B", "C"};
Eval(EvalExpr(dt << NewScript( "test",
c = "// This comment will not appear in the new script as it is inside the"; Eval(EvalExpr())
mystring = Expr(mystring);
mylist = Expr(mylist);
)));
c = "// JSL output";
c="// mystring = \!"Hello world!\!";";
c = "// mylist = {\!"A\!", \!"B\!", \!"C\!"};";