App production on Prime



#4

Well i am trying,

I have a suite of programs that I would like to create an APP for. Each of the three routines that I have created all run independently as programs (thanks Eddie for helping).

I have entered the Dice program in and have been picking it apart to the point where I can create the an AVIATION APP which when VIEW is keyed displays the menu:

1 Start
2 Great Circle
3 Intermediate Latitude
4 Temperature Corrections
5 QNH>31.00

The start of the APP in edit appears as:

EXPORT Aviation()

BEGIN
END;

VIEW "Start",START()

BEGIN
STARTVIEW(6,1);
END;

VIEW "Great Circle",GREAT_CIRCLE()

BEGIN

HFormat:=1;
HDigits:=0;
HAngle:=1;

LOCAL D,B,lat1,lon1,lat2,lon2;

D:=ACOS(SIN(lat1)*SIN(lat2)+COS(lat1)*
COS(lat2)*COS(lon2-lon1))*60;

B:=ATAN((SIN(lon2-lon1)*COS(lat2))/
((COS(lat1)*SIN(lat2)-SIN(lat1)*COS(lat2)
*COS(lon2-lon1))))*-1;

IF B<0 THEN B:=B+360;

END;

MSGBOX("Great Circle = " +D+" nautical miles");

MSGBOX("True Track = " +B+" degrees");

END;

//followed by three more subroutines with the correct view commands.

This does not work ;-)

I cannot get the subroutines to run when the associated menu selection is made. Does the APP call the routines or must they be imbedded in the APP code. I notice that the Dice example has both calls and embedded code so I am at a loss.

In effect, what is the syntax after the start menu is created:

EXPORT Aviation()

BEGIN
END;

VIEW "Start",START()

BEGIN
STARTVIEW(6,1);
END;

VIEW "Great Circle",GREAT_CIRCLE()

The independent routines are called:

GREAT_CIRCLE
INT_LAT
TMP_COR

thanks in advance,

Geoff

Edited: 11 Oct 2013, 2:25 a.m.


#5

Hi Geoff,

it should work! Maybe you try a very simple test (copy of the Function APP):


EXPORT Function1()
BEGIN

END;
VIEW "Start",START()
BEGIN
MSGBOX("Hallo!")
END;

VIEW "View 1",VIEW1()
BEGIN
MSGBOX("View 1")
END;

You should [Check] the program once, go to the Home screen and switch to the View screen. Selecting "View 1" should show a message on the screen.

Maybe the existence of a global routine and a view routine of the same name makes the difference? Rename your SETVIEW routines to something different (V_...) and try again.


#6

Thanks Marcus,

I get the start menu and views. I will play around with the embedded functions. The check function gives me "no errors" but my syntax is wrong.

When I get it running I will post the results.

Danke

Geoff


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime: =f(x):=expression in spreadsheet app CR Haeger 1 346 12-05-2013, 07:53 AM
Last Post: cyrille de Brébisson
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 214 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  HP prime: linear solver app Alberto Candel 1 320 11-21-2013, 01:57 AM
Last Post: Michael Carey
  HP Prime: Linear Solver app bug BruceH 0 210 11-15-2013, 06:36 PM
Last Post: BruceH
  HP Prime - CAS functions in Spreadsheet App CR Haeger 6 580 11-11-2013, 12:37 AM
Last Post: Michael de Estrada
  HP Prime - Geometry App inconsistence bluesun08 4 413 11-10-2013, 01:48 PM
Last Post: parisse
  HP Prime - Geometry App Intersection bluesun08 2 309 11-10-2013, 07:52 AM
Last Post: bluesun08
  HP Prime - more than a spreadsheet app so far CR Haeger 0 215 11-08-2013, 03:45 PM
Last Post: CR Haeger
  Equation Library/App for the Prime Harold A Climer 3 377 10-30-2013, 10:14 AM
Last Post: CompSystems
  Example of an App created for Prime, (schedule program from earlier posting). Geoff Quickfall 0 189 10-28-2013, 05:09 PM
Last Post: Geoff Quickfall

Forum Jump: