HP Forums

Full Version: self modifying code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It occurred to me today that self modifying code is easily done in PPL. Save the following program as HiBye and run it a few times from Home.

 LOCAL source;
 IF INSTRING(source,"He"+"llo") THEN
 RETURN "Hello";

hee hee.
Editing programs with Programs("name") is wonderful until you hit the limit of 65,535 characters for the string type.
With Programs():=string, is the program compiled at save time or upon first run time?
Programs():=string compiles during execution, that is why you can even abort the execution if you find a difference relevant to the previous code. This instruction it returns 1 if compiled correctly and 0 if there are syntax errors.
Reference URL's