[Exec Tech Tip] # box around bullets cbox 3,1,7,60,3,25 text 1,1,"Text Quoting, and Exec Command Usage tips",univers,16,bold,cols=80,center # ## Samples using the regular UnForm command syntax # # sample 1 text 10,5,"Regular Command example using literal text",univers,14 # sample 2 text 10,10,{myVariable$},univers,14 prepage { myVariable$="Text in a code-block variable" } # sample 3 text 10,15,Literal Text that Does NOT Have Surrounding Quotes So It Loses All Case And Would 'Break' With Embedded Comma Punctuation,courier,10,wrap # sample 4 text 10,20,"This DOES Have Surrounding Quotes, so it is OK with case and commas",univers,14 # ## Samples using the exec() function in a code-blocks # # sample 5 prepage { myVariable2$=myVariable$+" - with an Exec(); example 1; No explicit quotation characters" exec("text 10,25,"+myVariable2$+",univers,12,wrap") } # sample 6 prepage { myVariable3$=myVariable$+" - with an Exec(), example 2, WITH explicit quotation characters so Everything's A-OK" txt$="text 10,30,"+QUO+myVariable3$+QUO+",univers,12,wrap" exec(txt$) } # sample 7 prepage { bullet7$="Bullet list numbering and dividing lines here are created by a loop inside a code-block building a list of text commands; notice the line-feed character on the end of the text variable assignment that allows multiple commands to be appended and processed with a single exec() function." lastItem=8 txt$="" for row=5 to 60 step 5 count+=1 if count>lastItem then break bullet$=str(count)+"." txt$+="text 5,"+str(row)+","+QUO+bullet$+QUO+",cgtimes,18"+$0a$ txt$+="cline 4,"+str(row-1.25)+",80,"+str(row-1.25)+",3"+$0a$ next row txt$+="text 10,35,"+QUO+bullet7$+QUO+",univers,10,wrap" exec(txt$) } # sample 8 text 10,40,"The QUO variable and $22$ for hex-value and chr(34) are interchangeable in code-blocks for appending explicit quotations. It is possible in some cases to string together quotations to produce the same results, but our experience is that it can become confusing to read, and does not work in more complicated constructions, so we recommend using the concatenation syntax shown in the sample.",cgtimes,12,wrap