HP PPL compiler big, nasty, hairy, smelly, creapy BUG!
|
01-11-2014, 03:05 AM
Post: #8
|
|||
|
|||
RE: HP PPL compiler big, nasty, hairy, smelly, creapy BUG!
Thomas Klemm, thanks.
I think you underestimate what you know. Your first line produced a syntax error. However, your second line EXPR(varptr + ":=' " + var1 + "'"); showed some promise. The second line, stored indirectly, the contents of var1 in the variable pointed to by the contents of varptr. The problem with the second line you submitted was that it stored the var1 contents string as s*t*r*i*n*g. That is to say, there was an asterisk between each charactor of the string because of the way it was being parsed. A minor tweak of your EXPR line produced the desired results without the compiler bug workaround work around line of IF TYPE(var1)==2 THEN var1 := STRING(var1);END; before the EXPR line. This line is saying, if var1 is ALREADY a string then go ahead and convert it to a string ANYWAY! This is a bug work around. The tweak of your line that eliminated the asterisk between each charactor is: // This performs indirect addressing. EXPORT SYMBOL1="wrong"; EXPORT Thomas_Klemm() BEGIN LOCAL varptr="SYMBOL1",var1="right"; EXPR(varptr+":="+'"var1"'); END; This allows varptr to be constructed and point to SYMBOL1, SYMBOL2, SYMBOL3... That is to say, indirect addressing. Many thanks to Thomas Klemm. This is a much simpler and more elegant solution than the bug work around. Happy coding and may you see ' i No errors in the program ' with every compilation. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)