Post Reply 
PPL Inconsistency: Storing Functions to Function Variables
02-18-2023, 03:37 PM (This post was last modified: 02-18-2023 03:39 PM by Eddie W. Shore.)
Post: #1
PPL Inconsistency: Storing Functions to Function Variables
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-18-2023, 07:05 PM
Post: #2
RE: PPL Inconsistency: Storing Functions to Function Variables
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;
Find all posts by this user
Quote this message in a reply
Post Reply 




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