Post Reply 
Calling the contents of an identifier
03-13-2017, 01:45 AM
Post: #1
Calling the contents of an identifier
Hello

It is common within a program to store an identifier inside another identifier and then store an object within the contents of the last ID, I have not currently been able to do this in HPP-PL

X:=0; [ENTER] 0
sto('X+1',F1); [ENTER]
F1; [ENTER] 'X+1' // ok
FunctionUserAppVar:='F2'; [ENTER] F2 // OK
sto('X+2',FunctionUserAppVar); [ENTER] // 2 =(

I think the first argument ('X+2') if it is enclosed in quotation marks should not be evaluated 0+2 -> 2, Should be kept 'X+2'

Now the second argument, should be able to be controlled with eval CMD Or with a new RECALL command, to call n times your content.

ID1:= 'ID0'
ID:='ID1'

eval(ID,1) == recall 1 time -> ID1
eval(ID,2) == recall 2 times etc -> ID0

sto('X+2',eval(FunctionUserAppVar,1) ); == sto('X+2', 'F2') == (F2:='X+2')
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Calling the contents of an identifier - compsystems - 03-13-2017 01:45 AM



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