| Author |
Message |
Emell
Peasant


Joined: Dec 27, 2009
Posts: 12
|
Posted:
Tue Feb 09, 2010 4:47 am |
|
I'm writing what should be a very simple program for my fx-9860G. I'm creating a menu with F-key selections, then using getkey to 'Goto n' command to jump to Lbl n. I keep getting a 'GO ERROR' when I press one of the F-keys. The code looks generally like this (carriage return symbol not shown):
Lbl 0
<input parameters routine>
ClrText
Lbl 1
<display menu routine>
Lbl 2
Do
Getkey→G
LpWhile G=0
G=79=>Goto 3
G=69=>Goto 4
G=59=>Goto 0
G=49=>Goto 5
Goto 2
Lbl 3
<command routine>
Lbl 4
<command routine>
Lbl 5
Stop
The code works for all F-keys except F2 (69), which returns the following error message:
GO ERROR
Press:[EXIT]
When I press EXIT, the screen displays the code and the cursor is sitting just to the right of 'Goto 4.'
Can anyone explain why I get this error message and what the possible conditions that cause it?
|
|
|
|
|
 |
jack12344
Peasant


Joined: Feb 11, 2010
Posts: 4
|
Posted:
Thu Feb 11, 2010 9:05 pm |
|
Hi,I've just checked your program command, and there's nothing wrong with it.Maybe there is an "Goto" command in your <command routine>,you can just search fot it.
If you checked there is no extra "Goto" command in your <command routine> and you don't mind, you'd better rewrite it again.
|
|
|
|
|
 |
Distortion
Team Kingdom


Joined: Oct 17, 2007
Posts: 581
Location: The Netherlands
|
Posted:
Fri Feb 12, 2010 1:01 am |
|
You haven't properly closed a Statement (like If or While) in the command routine after Lbl 3.
|
_________________ |Distortion| |
|
|
|
 |
Emell
Peasant


Joined: Dec 27, 2009
Posts: 12
|
Posted:
Fri Feb 12, 2010 4:01 am |
|
You were right about the closed statement. I had used an If...then...else command without an IfEnd in my Lbl 3 command routine. I fixed that, now I get a 'Syntax Error' message at the same point in the code where I got the 'Go Error' message.
It's a simple Quadratic Equation Solver. I know there are Quadratic programs available for downloading, which I have, but I really want to use my own.
Is there some way I can send you the entire program listing (50 lines) and examine the code for me?
|
|
|
|
|
 |
Dysprosium
Baron


Joined: Sep 30, 2007
Posts: 251
Location: HEY LOOK BEHIND YOU
|
Posted:
Fri Feb 12, 2010 4:18 am |
|
| Distortion wrote: |
| You haven't properly closed a Statement (like If or While) in the command routine after Lbl 3. |
Wow, nice... was that a shot in the dark or has it happened to you before?
@Emell PM him the .g1m file if you don't want the whole world to see it.
|
_________________ Twitter |
|
|
|
 |
Emell
Peasant


Joined: Dec 27, 2009
Posts: 12
|
Posted:
Sat Feb 13, 2010 5:59 am |
|
I tried to PM my program file. I tried attaching both a .g1m and a .g2r file, but I keep getting this message:
'The Extension .g1m is not allowed.'
and...
'The Extension .g2r is not allowed.'
So how do I attach my program file here?
|
|
|
|
|
 |
Dysprosium
Baron


Joined: Sep 30, 2007
Posts: 251
Location: HEY LOOK BEHIND YOU
|
Posted:
Sat Feb 13, 2010 6:05 am |
|
.zip it first.
|
_________________ Twitter |
|
|
|
 |
Emell
Peasant


Joined: Dec 27, 2009
Posts: 12
|
Posted:
Sun Feb 14, 2010 6:34 am |
|
Thanks for the tips. You all have been very helpful. I zipped both the .g1m and the .g2r versions of my program. Here is the file.
When the program is run, you are prompted to enter the standard quadratic parameters, a, b and c. Then a Select Function menu will be displayed. All selections work fine except F2. When F2 is pressed, I get a 'Syntax Error' message, then, when 'EXIT' is pressed, the cursor is at the end of the 'G=69=>Goto 4' command (69 is the getkey code for the F2 key). BTW, I tried using 'If G=69:then Goto 4:IfEnd.' Same thing.
| Description: |
|
Download |
| Filename: |
Parabola.zip |
| Filesize: |
1.19 KB |
| Downloaded: |
164 Time(s) |
|
|
|
|
|
 |
aapman55
Baron


Joined: Aug 25, 2008
Posts: 142
Location: Nederland
|
Posted:
Sun Feb 14, 2010 6:54 pm |
|
you forgot to put the " at the end of locate X,Y,"........."
|
|
|
|
|
 |
Emell
Peasant


Joined: Dec 27, 2009
Posts: 12
|
Posted:
Mon Feb 15, 2010 7:47 am |
|
Yahoo! That fixed it. Thank you, aapman55. You da man!!
|
|
|
|
|
 |
|
|
|
|