HP Forums

Full Version: App production on Prime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.

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.

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