HP Prime Graphing Wireless Calculator User Manual
Page 290

286
Programming in HP PPL
c1 can be any color specified as #RRGGBB. The default is
black (#000000).
width is optional and if not specified, no clipping is
performed.
c2 can be any color specified as #RRGGBB. c2 is
optional. If not specified the background is not erased.
Example:
The following program displays the successive
approximations for π using the series for the arctangent(1).
Note that a color for the text, and for background, has
been specified (with the width of the text being limited to
100 pixels).
EXPORT PISERIES()
BEGIN
LOCAL sign;
K:=2;
A:=4;
sign:=−1;
RECT();
TEXTOUT_P("N=",0,0);
TEXTOUT_P("PI APPROX=",0,30);
REPEAT
A+sign*4/(2*K-1) ▶ A;
TEXTOUT_P(K ,35,0,2,#FFFFFF,
100,#333399);
TEXTOUT_P(A ,90,30,2,#000000,100,
#99CC33);
sign*-1 ▶ sign;
K+1 ▶ K;
UNTIL 0;
END;
END;
The program executes
until the user presses
O
to terminate.