HP Forums

Full Version: PPL Inconsistency: Storing Functions to Function Variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I did some work with the HP Prime this week. The PPL and the way things are done at the Home screen are inconsistent. I can use quotes to store functions ( F1:="X^2+1" ) but have to use the QUOTE command in a program. ( F1:=QUOTE(X^2+1) )

Aside, I also found that using STARTAPP at the beginning allows me to use app commands without having to use prefixes first.
All quoting ways appear to work, even when not in a native app for the variable (F1). Do you have an example?

Code:

//ppl version 14596

// 2023.0218 pretty-prime v0.3b
#pragma mode(separator(.,;) integer(h32))
EXPORT a_b() 
BEGIN 
LOCAL x,y,z ;
  STARTAPP("Triangle_Solver");

  F1:="X^2-4";
  x:=ROOT(F1,X);

  F1:='X^2-4';
  y:=ROOT(F1,X);

  F1:=QUOTE(X^2-4);
  z:=ROOT(F1,X);

  RETURN ({x,y,z});
END;
Reference URL's