Post Reply 
Indirect addressing in HP PPL. Is it possible?
01-09-2014, 09:05 PM (This post was last modified: 01-09-2014 10:55 PM by veeblefester.)
Post: #3
RE: Indirect addressing in HP PPL. Is it possible?
The code below does not work when var1 is a string.

The reason I claimed that EXPR could not bring about indirect addressing is because I experimented with EXPR using a string.

In the app I am developing, var1 is a string.

This is very curious, when var1 is a string, in edit the check reports no errors.
However, at runtime a syntax error is caused by the EXPR line.

I tested your EXPR line, it works perfectly if var1 is a real, integer or symbolic.

Any thoughts on making the EXPR line work when var1 is a string?

Thanks in advance for any help.

EXPORT SYMBOL1;
EXPORT test2()
BEGIN
LOCAL var1="a string",varptr="SYMBOL1";
INPUT(varptr,"Variable Name","Varnam=","Enter the var name","A");// Key in SYMBOL1
EXPR(varptr + ":=" + var1);
END;

Happy coding and may you see ' i No errors in the program ' with every compilation.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Indirect addressing in HP PPL. Is it possible? - veeblefester - 01-09-2014 09:05 PM



User(s) browsing this thread: 1 Guest(s)