Post Reply 
Quadratic Explorer App
11-10-2016, 02:36 PM (This post was last modified: 11-29-2016 10:22 PM by compsystems.)
Post: #1
Quadratic Explorer App
Hello,
I want to swich from the "terminal view" to the application "Quadratic Explorer App",
but only at the end of the program is changed to the application, does not follow the logic of the algorithm


PHP Code:
#cas 
    
dinamicLkn_quadExplorer():=
    
begin
        local coeff
polrootsdiscriminant;
        print; 
// clear terminal view
        // freeze;

        
print("Current view: TERMINAL VIEW");
        
coeff := [0.5, -32.5];
        
pol := SLIST(coeff.*seq('x'^k,k,2,0));
        
//roots := SOLVE(0.5, -3, 2.5); 
        //roots := SOLVE(pol[1], pol[2], pol[3]);
        
roots := Quadratic_Explorer::SOLVE(0.5, -32.5);

        print( 
"COEF: " coeff ); 
        print( 
"POL: " pol ); 
        print( 
"ROOTS: x1 = " roots[1] + ", x2 = " roots[2] );
        
discriminant := DELTA(0.5, -32.5);
        print( 
"DISCRIMINAT: D = " discriminant ); wait();

        
startapp("Quadratic_Explorer");  wait(); //  current: Quadratic_Explorer


         
startview(1);


        print(
"Again on the terminal view"); wait();   // return to terminal view  & Wait for a key  ...

        
return "done"//Returns an output value (string) 
    
end;
#end 

request: the Quadratic_Explorer() CMD Should initialize the polynomial expression of the quadratic function.

Quadratic_Explorer(a,b,c); // A*X^2+B*X+C
Quadratic_Explorer(0.5, -3, 2.5);

[Image: QuadraticExplorerApp_hp_prime_image00.png]
Find all posts by this user
Quote this message in a reply
11-10-2016, 08:52 PM (This post was last modified: 11-11-2016 02:59 AM by Carlos295pz.)
Post: #2
RE: Quadratic Explorer App
Quadratic_Explorer() is a default function that has no value, a program can not be empty.

You can call an app using STARTAPP ("name");

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
11-14-2016, 06:03 AM
Post: #3
RE: Quadratic Explorer App
Hello,

The startApp command will start the app. Meaning that it makes it active (and starts its main view)...

However, the view will not become interractive with the user until the program completes...

Unfortunately, there is no way, at this point in time, for you to programmatically start the view, let the user do something there and then continue your program when he is done.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
11-14-2016, 12:17 PM
Post: #4
RE: Quadratic Explorer App
(11-14-2016 06:03 AM)cyrille de brébisson Wrote:  Hello,

[...]
However, the view will not become interractive with the user until the program completes...

Unfortunately, there is no way, at this point in time, for you to programmatically start the view, let the user do something there and then continue your program when he is done.

Is this true for ALL applications including Geometry?
I'm currently writing a program that computes coordinates of 2D points that I want to draw (as well as segments joining them) in the Geometry App to simulate the rotation of a cube, knowing that these computations (ccordinates conversion during roation) are based on x and y coordinates of a point on the Geometry view, moved by the finger (as "sliders").
At the end, horizontal and vertical movements of the finger on the screen wezre supposed to pilot the rotation of the pseudo 3D cube, in an interactive way.

I was able to have these conversions writen in the Symbolic view of the Geometry App at the time there I considered one single rotation, but since I want to have two at the same time, equation get too long and this is the reason why I wanted to write them in a program.
How should I proceed then?

Kind regards.
Jean-Michel.
Find all posts by this user
Quote this message in a reply
11-15-2016, 06:10 AM
Post: #5
RE: Quadratic Explorer App
Hello,

Programatically, you can do a STARTVIEW to start a specific view. STARTVIEW also allows you to force a redraw of the view while the program is executing.
This allows you to force a display, but will not provide interactivity.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
11-21-2016, 09:12 PM
Post: #6
RE: Quadratic Explorer App
startview(1); in the code above does not change between views =(

I think there must be a way to switch since "Terminal_View" to another view STARTAPP("Terminal_View");, and "freeze" the current application, For now no dynamic link, only switch between views.

Also without arguments should return the current app as string, so that at the end of the program restore the initial view
STARTAPP(); -> "Quadratic_Explorer"


PHP Code:
currentAPP := STARTAPP(); // store the begin app
...
 
STARTAPP(currentAPP); // restore the begin app 
Find all posts by this user
Quote this message in a reply
Post Reply 




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