Computing.Net > Forums > Programming > Gwbasic help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Gwbasic help

Reply to Message Icon

Name: Farcus
Date: November 4, 2003 at 14:16:56 Pacific
OS: Win98
CPU/Ram: 287 sdram pc133
Comment:

ok i need to get the program to work right so that the 1st page goes

*******************************************
This is the grade averageing for Sandlewood

Press 1 for 1st semester

Press 2 for 2nd semester

Press Q for neither (quit)


*************************************

i got the message all on my lines but i can't get the input to work right... i know you need a input for the please press 1,2 or Q to work right... i got the input to be

100 print "Please Press a (1,2, or Q) and enter";:input A

but then what? i need to let A = 1,2,q and each would lead to a different part of the whole program... This is like a menu ... also i need to know how to get the "For T=..." to work right like the part that has "Please Press a (1,2, or Q) and enter" i need it to repeat 4 times if somebody does not press those 3 choice (its a error trap i need to know how to get those to work) and after the 4th time it'll repeat itself... i know you'll need to use For T= .... then Next T but where and how? if this doesn't explain the problem right tell me i'll try to explain better... thanks a lot in advances guys... =)



Sponsored Link
Ads by Google

Response Number 1
Name: Farcus
Date: November 4, 2003 at 14:19:45 Pacific
Reply:

sorry for the ************** ********** part i got it wrong
it should go
******************************************
1 for 1st semester

2 for 2nd semester

Q for neither (quit)

Please Press a (1,2, or Q) and enter
******************************************


0

Response Number 2
Name: wizard-fred
Date: November 5, 2003 at 03:32:21 Pacific
Reply:

Input A cannot processs both numeric and string input. You may use input 1, 2 or 0 to quit.


0

Response Number 3
Name: sidney
Date: November 5, 2003 at 04:05:36 Pacific
Reply:

The FOR NEXT loop surrounds the input and checking process.
eg.
95 For t=1 to 4
100 print "enter choice";Input a$
110 If a$="1" then goto 160
120 If a$ = "2" then goto 170
130 If a$ = "q" then end
140 print "please enter a correct value"
150 next t
160 rem ** From entering 1
170 rem ** From entering 2

As you see in line 100, Input a$ lets you enter any char on keyboard, error checking is done by checking if a$= "Whatever you type in".


0

Response Number 4
Name: Farcus
Date: November 5, 2003 at 14:36:30 Pacific
Reply:

ok but for line 130 i don't need to end i need it to go to another screen that says "are you sure you want to quit" i know how to do that but the thing is whenever i press 1 or 2 and after the calculation it goes the the end screen too so what should i do? put it at the front part of my program?

and for line

120 If a$ = "2" then goto 170

i need it to incoperate the stuff from 1 because 2 is a full year which has 4 grading period which i put MP1,MP2,MP3,MP4,and a final exam.. while 1 is only half year and it only has MP1,MP2, and final exam... do i need to loop somewhere?


0

Response Number 5
Name: GE Martin
Date: November 28, 2003 at 14:22:07 Pacific
Reply:

This not in respose to your problem !!

I have a larger one .. I have over 300 gwbasic programs written w/win 95. Have transferred them all to my new DELL w/windows XP. They execute fine .. however, the screen won't resize and more importantly, I can't list programs or print program results. Can you point me in the right direction for help? Thanks .. Jerry


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Gwbasic help

Gwbasic help need www.computing.net/answers/programming/gwbasic-help-need/15375.html

GWBASIC Helps www.computing.net/answers/programming/gwbasic-helps/8489.html

GWBASIC help www.computing.net/answers/programming/gwbasic-help/3617.html