Skip to content

Instantly share code, notes, and snippets.

@toddgeist
Last active December 15, 2015 15:28
Show Gist options
  • Save toddgeist/5281596 to your computer and use it in GitHub Desktop.
Save toddgeist/5281596 to your computer and use it in GitHub Desktop.
parsing parameters
Let (
[
// set "~parameters" to a Valid Let Variables String for ex. Get (ScriptParameter) or Get (ScriptResults)
~parameters = $LetVariables;
//---------- NO NEED TO EDIT BELOW HERE -----------------
~evaluateString =
"Let( [¶"
& ~parameters
& If ( Right ( ~parameters ; 1 ) = ";"
or Right ( ~parameters; 1 ) = ¶;
"$~ = $~") //terminating variable to keep semicolon-delimited sytax in parameters consistent
& "¶];¶"
& "True¶)"
]; //end variable definitions
If ( IsValidExpression ( ~evaluateString );
Evaluate ( ~evaluateString );
//else, ~evaluateString is not a valid expression...
False
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment