Parse() command to output quoted stringDear community,
I am trying to generate som code by concatenating strings. The string will be evaluated using Eval( Parse( ) ). The outcome of this should contain a quoted string, let me exemplify:
List = {"Item1", "Item2"};
string = Concat( "Select(", List[1], ")" );
This string will read "Select(Item1)" and Parse( string ) will return Select(Item1). What I want is that Parse( string ) should return Select("Item1"), with quotes.
Any help is much appreciated
Re: Parse() command to output quoted stringAnother way to embed double quotes is to use the \[...]\ delimiters around the string. I'm also using evalinsert() to evaluate List[1], using ^ characters around it.
string2 = evalinsert("\[Select("^List[1]^")]\");Re: Parse() command to output quoted stringThe solution is to add your quotes into the string you are attempting to produce.
\! is the escape sequence for JMP that allows for the interpretation of the character following it to be properly handled. Therefore \!" will allow the double quote character to be embedded in the string
Names Default To Here( 1 );
List = {"Item1", "Item2"};
string = "Select(\!"" || List[1] || "\!")";
Show( Parse( string ) );