Problems with my first program [solved]
12-26-2013, 06:33 PM (This post was last modified: 12-27-2013 12:01 PM by ArielPalazzesi.)
Post: #1
 ArielPalazzesi Member Posts: 90 Joined: Dec 2013
Problems with my first program [solved]
Hello!
I'm writing my first program, and I'm having a little problem with the following code:

Code:
EXPORT tiro1() BEGIN local M,str,xpos0,ypos0; local lista1, lista2; local angulo; CHOOSE(M, "Unidades", "SI", "US"); IF M==1 THEN   str := "m";   G := 9.80665; ELSE    str := "pies";   G := 32.17404; END; //Manejo el tema del formato de los angulos angulo := HAngle; HAngle := 1; //Modo = grados lista1 := {"Pos. en X:", "Pos. en Y:", "Angulo:","Vel. inicial:"}; lista2 := {"Posición inicial en X ("+str+")","Posición inicial en Y ("+str+")","Angulo alfa (grados)","Velocidad inicial ("+str+"/s)"}; INPUT ({G,H,A,V},"Condiciones iniciales",lista1, lista2); STARTAPP("Parametric"); X1 := "G+V*COS(A)*T"; Y1 := "H+V*SIN(A)*T-G*T^2/2"; CHECK(1); Xmin := "0"; Xmax := "G+(V^2*SIN(2*A))/G"; Ymin := "0"; Ymax := "H+(V*V*SIN(A)*SIN(A))/(2*G)"; STARTVIEW(1,1); HAngle := angulo; END;

when I run the program with the following data (or any other)

I get the following error:

What am I doing wrong?

TIA. Ariel.
12-27-2013, 10:39 AM
Post: #2
 ArielPalazzesi Member Posts: 90 Joined: Dec 2013
RE: Problems with my first program
PD: In the second picture is a T ² * T ... It is an error in the equation, which was already corrected, and that obviously is not the cause of the problem with the program.

Greetings.
12-27-2013, 11:19 AM
Post: #3
 ArielPalazzesi Member Posts: 90 Joined: Dec 2013
RE: Problems with my first program

The code:

Code:
EXPORT tiro1() BEGIN local M,local, lista1, lista2,angulo,str; CHOOSE(M, "Unidades", "SI", "US"); IF M==1 THEN   str := "m";   G := 9.80665; ELSE    str := "pies";   G := 32.17404; END; //Manejo el tema del formato de los angulos angulo := HAngle; HAngle := 1; //Modo = grados lista1 := {"Pos. en X:", "Pos. en Y:", "Angulo:","Vel. inicial:"}; lista2 := {"Posición inicial en X ("+str+")","Posición inicial en Y ("+str+")","Angulo alfa (grados)","Velocidad inicial ("+str+"/s)"}; INPUT ({L,H,A,V},"Condiciones iniciales",lista1, lista2); X1 := "L+V*COS(A)*T"; Y1 := "H+V*SIN(A)*T-G*T^2/2"; STARTAPP("Parametric"); CHECK(1); Xmin := -1; Xmax := L+(V^2*SIN(2*A))/G; Ymin := -1; Ymax := H+(V*V*SIN(A)*SIN(A))/(2*G); STARTVIEW(1,1); HAngle := angulo; END;
 « Next Oldest | Next Newest »

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