HP Forums
Can built-in routines be redefined in PPL? (ANSWERED) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Can built-in routines be redefined in PPL? (ANSWERED) (/thread-9686.html)



Can built-in routines be redefined in PPL? (ANSWERED) - StephenG1CMZ - 12-12-2017 11:40 PM

I am wondering whether standard routines can be redefined.
This might be useful as a work-around for a bug, or as a way of making code more portable.
Imagine importing Python code using math.log and redefining that to ln, instead of having to change all of the code (using an editor without search and replace).

Code:


EXPORT SIN(XX) //Does not compile
BEGIN
 MSGBOX("SN");
END;

EXPORT MATH()
BEGIN
 MATH.SIN(90);
END;

The obvious attempt will not compile...
Perhaps there is a way of hiding the SIN from the compiler.
EXPORT STRING(SIN)... ?


RE: Can built-in routines be redefined in PPL? - cyrille de brébisson - 12-13-2017 05:55 AM

Hello,

Nope, sorry, build ins are not overridable.

Cyrille