Post Reply 
PRINT(); command weird behavior.(SOLVED).
03-24-2015, 06:10 PM (This post was last modified: 03-24-2015 06:56 PM by Spybot.)
Post: #1
PRINT(); command weird behavior.(SOLVED).

Hi Everyone!
I have a question about the PRINT(); command.
I don't know why my program is skiping the PRINT(); command...
I have the following code:



EXPORT test()
BEGIN
LOCAL me;OP;

me:="To find the shortest distance between a point and a line, you need to provide one of the following data sets:
1) Ax+By+C=0 & P(x₀,y₀)
2) y=mx+b & P(x₀,y₀)
3) P1(x₁,y₁),P2(x₂,y₂) & P(x₀,y₀).";

PRINT();
PRINT(me);

CHOOSE(OP,"I Have...",{"Ax+By+C=0 & (x₀,y₀)","y=mx+b & P(x₀,y₀)","P1(x₁,y₁),P2(x₂,y₂) & P(x₀,y₀)"});
END;


when I run this code, it jumps right straight to the CHOOSE command, and I never get to see the text.

Any ideas about what could I be doing wrong! I'll appreciate it.

Spybot.
Find all posts by this user
Quote this message in a reply
03-24-2015, 06:23 PM
Post: #2
RE: PRINT(); command weird behavior.
(03-24-2015 06:10 PM)Spybot Wrote:  
Hi Everyone!
I have a question about the PRINT(); command.
I don't know why my program is skiping the PRINT(); command...
I have the following code:



EXPORT test()
BEGIN
LOCAL me;OP;

me:="To find the shortest distance between a point and a line, you need to provide one of the following data sets:
1) Ax+By+C=0 & P(x₀,y₀)
2) y=mx+b & P(x₀,y₀)
3) P1(x₁,y₁),P2(x₂,y₂) & P(x₀,y₀).";

PRINT();
PRINT(me);

CHOOSE(OP,"I Have...",{"Ax+By+C=0 & (x₀,y₀)","y=mx+b & P(x₀,y₀)","P1(x₁,y₁),P2(x₂,y₂) & P(x₀,y₀)"});
END;


when I run this code, it jumps right straight to the CHOOSE command, and I never get to see the text.

Any ideas about what could I be doing wrong! I'll appreciate it.

CHOOSE operates on a different graphics buffer than PRINT, if I'm not mistaken. Does it still behave this way if you place a WAIT(-1) in between the PRINT and CHOOSE ?

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-24-2015, 06:42 PM
Post: #3
RE: PRINT(); command weird behavior.
The LOCAL declaration needs a comma separator:

LOCAL me, OP;

Otherwise a wait(-1); for the terminal screen to display me:

Code:

EXPORT test()
BEGIN
LOCAL me,OP;

me:="To find the shortest distance between a point and a line, you need to provide one of the following data sets:
1) Ax+By+C=0 & P(x₀,y₀)
2) y=mx+b & P(x₀,y₀)
3) P1(x₁,y₁),P2(x₂,y₂) & P(x₀,y₀).";

PRINT();
PRINT(me);
wait(-1);

CHOOSE(OP,"I Have...",{"Ax+By+C=0 & (x₀,y₀)","y=mx+b & P(x₀,y₀)","P1(x₁,y₁),P2(x₂,y₂) & P(x₀,y₀)"});
END;
Find all posts by this user
Quote this message in a reply
03-24-2015, 06:50 PM
Post: #4
RE: PRINT(); command weird behavior.
(03-24-2015 06:42 PM)DrD Wrote:  The LOCAL declaration needs a comma separator:

LOCAL me, OP;

Otherwise a wait(-1); for the terminal screen to display me:

yes, in fact.
I was writing the same thing Wink

it should be the comma...

salvo

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2015, 06:56 PM
Post: #5
RE: PRINT(); command weird behavior.
Thank you very much Guys!

Very valuable answers!!!

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




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