Post Reply 
Any options for better interactive terminal-style I/O?
07-26-2018, 03:56 PM (This post was last modified: 07-26-2018 04:06 PM by compsystems.)
Post: #2
RE: Any options for better interactive terminal-style I/O?
Hello, this is a very requested requirement, I do not know what is the difficulty of incorporating it, hardware?

The first step is to include xcas printf cmd

An example of code between HP-PRIME_XCAS and XCAS, notice how difficult and ugly/primitive it is to read mathematical expressions in 1D

XCAS HPPRIME CODE
PHP Code:
#cas
    
terminalViewTest():=
    
begin
        local x
y;
        
assumexsymbol ); 
        
assumeysymbol );
        
autosimplify(nop);
        
DispG
        
ClrIO
        print( 
"Terminal View, 2D printing" );
        
        print( 
"" );      
        print( 
"Expr0:" );
        print( (
x^3-6*x^2+11*x-x=y) + (x^4-x^3-6*x^2+11*x-6)/x^6);
        
        print( 
"" );
        print( 
"Expr1:" ); print( "" ); f(x):=x^3-2*x^2+1*x-1;
        print( 
'f(x)' ); print( "" );
        print( 
f(x) );print( "" );
        
        print( 
"" );
        print( 
"Expr2:" ); print( "" );
        print( 
'f(x) | x=y' ); print( "" );
        print( 
'x^3-2*x^2+1*x-1 | x=y' ); print( "" );
        print( 
f(x) | x=); print( "" );
        print( 
'f(y)' ); print( "" );
        print( 
f(y) ); print( "" );
        
        print( 
"" );
        print( 
"Expr3:" ); g(x):=1/(x+3);
        print( 
'g(x)' ); print( "" );; 
        print( 
g(x) );  print( "" );
   
        print( 
"" );     
        print( 
"Expr4:" );
        print( 
'f(g(x))' ); print( "" ); 
        print( 
f(g(x)) ); print( "" );

        print( 
"" );     
        print( 
"Expr5:" );        
        print( 
'g(f(x))' ); print( "" );
        print( 
g(f(x)) ); print( "" );
        
        return 
"Done";
    
end;
#end 


XCAS CODE
PHP Code:
terminalViewTest():={
        
local xy;
        
assumexsymbol ); 
        
assumeysymbol );
        
autosimplifynop) ;
        
DispG
        
ClrIO
        
printf"Terminal View, 2D printing" );
        
        
printf"" );      
        
printf"Expr0:" );
        
printf( (x^3-6*x^2+11*x-x=y) + (x^4-x^3-6*x^2+11*x-6)/x^6);
        
        
printf"" );
        
printf"Expr1:" ); printf"" ); f(x):=x^3-2*x^2+1*x-1;
        
printf'f(x)' ); printf"" );
        
printff(x) );printf"" );
        
        
printf"" );
        
printf"Expr2:" ); printf"" );
        
printf'f(x) | x=y' ); printf"" );
        
printf'x^3-2*x^2+1*x-1 | x=y' ); printf"" );
        
printff(x) | x=); printf"" );
        
printf'f(y)' ); printf"" );
        
printff(y) ); printf"" );
        
        
printf"" );
        
printf"Expr3:" ); g(x):=1/(x+3);
        
printf'g(x)' ); printf"" );; 
        
printfg(x) );  printf"" );
   
        
printf"" );     
        
printf"Expr4:" );
        
printf'f(g(x))' ); printf"" ); 
        
printff(g(x)) ); printf"" );

        
printf"" );     
        
printf"Expr5:" );        
        
printf'g(f(x))' ); printf"" );
        
printfg(f(x)) ); printf"" );
        
        return 
"Done";
}:; 

[Image: terminalView_xcas_image00.png]


poll
Is anyone else interested in having a better terminal view?

.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Any options for better interactive terminal-style I/O? - compsystems - 07-26-2018 03:56 PM



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