Post Reply 
Firmware 2021 - Test PRINT and PRINT2D cmds
04-28-2021, 10:51 PM (This post was last modified: 04-28-2021 11:04 PM by compsystems.)
Post: #12
RE: Firmware 2021 - Test PRINT and PRINT2D cmds
Hi, the following code works fine from HOME mode, but not from CAS mode.

Note that it uses WAIT cmd, to stop printing, in the hp48 and 50 series it showed HALT at the top, this is important to know that the printing is paused, I think it is also important to place this message, it may be above the la current time
Thanks


PHP Code:
#cas
test_expr2Dprint_CAS():=
BEGIN
    local x
,y;
    
purgef);
    PRINT(); print; 
// clear terminal view
    
print( "2D printing, Press any key to continue" ); wait;
    print( 
"\n" );
    print( 
"Expr1:" );
    print( 
'f(x) = x^3 - 2*x^2 + x -1' );
    
f(x) := x^2*x^-1wait;
    print( 
"\n\n" );

    print( 
"Expr2:" );
    print( 
'f(x) | (x=y)' ); wait;
    print( 
'x^3 - 2*x^2 + x -1 | (x=y)' ); wait;
    print( 
f(x) | (x=y) ); wait;
    print( 
"\n\n" );

    print( 
"Expr3:" );
    print( 
'g(x) = 1/(x+3)' );
    
g(x) := 1/(x+3); wait;
    print( 
"\n\n" );

    print( 
"Expr4:" );
    print( 
'f( g(x) )' ); wait;
    print( 
'x^3 - 2*x^2 + x -1 | ( x=g(x) )' ); wait;    
    print( 
'x^3 - 2*x^2 + x -1 | ( x = 1/(x+3) )' ); wait;    
    print( 
fg(x) ) ); wait;
    print( 
"\nsimplify:" );
    print( 
simplifyf(g(x)) ) ); wait;
    print( 
"\n\n" );

    print( 
"Expr5:" );
    print( 
'g( f(x) )' ); wait;
    print( 
'1/(x+3) | (x=f(x))' ); wait;
    print( 
gf(x) ) ); wait;
    print( 
"\nsimplify:" );
    print( 
simplifyg(f(x)) ) ); wait;

    print( 
"\nDone" );
    return 
"Done"

end

HOME mode
test_expr2Dprint_CAS() [enter] ok, but in the end it returns the source code, this is because the name of the program suppresses the parentheses
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Firmware 2021 - Test PRINT and PRINT2D cmds - compsystems - 04-28-2021 10:51 PM



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