Post Reply 
Setting up a HVar inside a program, IF it doesn't already exist.
04-14-2022, 09:51 PM
Post: #4
RE: Setting up a HVar inside a program, IF it doesn't already exist.
Does replacing this line:

CL(Z):=string(Z);

with:

CAS(EXPR("CL(" + Z + "):=string(" + Z + ")"));

do what you want?

Code:
EXPORT eraseme()
BEGIN
LOCAL prep2check, prep2, prep2number;
prep2number:=size(HVars);
prep2:=HVars;
   IF prep2number>0 THEN
    FOR Z FROM 1 TO prep2number DO
     IF prep2(Z)="CL" THEN prep2check:=1;END;
    END;
   END;

   IF prep2check=0 THEN
    HVars("CL"):={"1","2"};
     FOR Z FROM 1 TO 30 DO
      CAS(EXPR("CL("+Z+"):=string("+Z+")"));
     END;
   END;
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Setting up a HVar inside a program, IF it doesn't already exist. - roadrunner - 04-14-2022 09:51 PM



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