1.

Solve : gwbasic to vb?

Answer»

i have a gwbasic program that i need re written in vbasic but can do it myself is there anyone who could do it for me.
it is short.
i have screen capture of this gwbasic program only about 30 lines but dont know how to post it.Is this is because you:
A. Want to play the game as it is.
B. Want to see if it works better in Visual Basic.

Games written in GW -BAISC work best in the same.

You should be able to LIST the game program send to a file.
(I used to know how to do that.)

Quote from: topsy99 on April 05, 2012, 11:08:06 PM

i have screen capture of this gwbasic program only about 30 lines but dont know how to post it.

Save the proram on a floppy in ASCII format, then put the floppy in a Windows computer, open the program text in Notepad, and finally copy and paste the program text here.

Anyhow, what does it do?
the program adds up figures in a dat file.  gwbasic wont work in 64 bit but would like it to do so. so needs to be in vb or perl.
i cant WRITE either but did write the original gwbasic. it is small. i cant open it

[year+ old attachment deleted by admin]this posting is part of it the rest is here.     this is a handy program that i use regularly but now i have to use two computers to research.  i know it is old buyt used to do all my programming in gw basic. but got to old to manage the smarter stuff.   vb or perl would be great if any one can do it. dont want to break any rules but could always send a christmas CARD for a working version.
 64 bit doesnt allow gw basic      when i bought my computer it was set up in 64 bit and didnt realise gwbasic wouldnt work.


[year+ old attachment deleted by admin]it is only small  not a games programming but for text reading and adding up.
Not many people (a) understand GW-BASIC and (b) know Perl and (c) will enjoy squinting at those screen dumps and retyping your program. You are much more likely to get an answer if you post the program as copiable/pastable text. If you can LIST it, you can save it as ASCII. SAVE "progname",A saves the file progname in ASCII format. So type SAVE "MYPROG.BAS",A and then get the program text in an editor such as Notepad and copy and paste it in your next post. I am willing to try to create a Cscript version if you do what I have suggested.

it is quite readable if you double clik on them. i cant lift the text off the interpreter with copy or printing with notepad.
will try your suggestion and come back to you10 INPUT "filename ";ME$
20 DIM X$(3900),A$(4900)
30 INPUT "Search Name or XXX to end";S$
40 R(I) =0
50 IF S$="xxx" THEN END
60 OPEN "i",#1,ME$
70 IF EOF(1) THEN 230
80 INPUT#1,A$(I)
90 Q=Q+1
100 IF LEFT$(A$(I),LEN(S$)) < > S$ THEN 220
110 PRINT A$(I),Q
120 X$= RIGHT$(A$(I),1)
130 J = VAL(X$)
133 F$=LEFT$(A$(I),9)
140 Y$=RIGHT$(A$(I),2)
145 E = E+1
150 Z=VAL(Y$)
160 IF Z>0 THEN Z=9-Z
170 J = 9-J
180 IF J = 9 THEN J = 0
190 R(I) = R(I) +J+Z
200 PRINT R(I),E
210 N=N+1
220 GOTO 70
230 CLOSE#1
232 PRINT F$,R(I)
235 E=0
240 GOTO 30


there we go     hope someone can help.What is it supposed to do? Some COMMENTS (REMs) would be nice. Also an example input file.


sample data  from the actuall  dat file

"arena(good)(2000)(randwick)27-09-98)2"
"sharscay(good)(2000)(randwick)27-09-98)5"
"yippyio(good)(2000)(randwick)27-09-98)6"
"turridu(good)(2000)(randwick)27-09-98)6"
"sunline(good)(1600)(randwick)27-09-98)1"
"camarena(good)(1600)(randwick)27-09-98)2"
"confer(good)(1600)(randwick)27-09-98)2"
"dodge(good)(1600)(randwick)27-09-98)1"
"super slew(good)(1600)(randwick)27-09-98)2"
"iron horse(good)(1600)(randwick)27-09-98)2"
"sedation(dead)(1417)(flemington)27-09-98)7"
"mossman(dead)(1417)(flemington)27-09-98)8"
"cooktown(dead)(1417)(flemington)27-09-98)8"
"aerosmith(dead)(2000)(flemington)27-09-98)3"
"gold guru(dead)(2000)(flemington)27-09-98)4"
"our unicorn(dead)(2000)(flemington)27-09-98)4"
"inaflury(dead)(1625)(flemington)27-09-98)3"
"rose of dane(dead)(1625)(flemington)27-09-98)4"
"astralita(dead)(1625)(flemington)27-09-98)4"
"rebel(dead)(1200)(flemington)27-09-98)5"
"dantelah(dead)(1200)(flemington)27-09-98)6"
"classic day(dead)(1200)(flemington)27-09-98)6"
"our dynamic lady(dead)(1417)(flemington)27-09-98)5"
"cannyanna(dead)(1417)(flemington)27-09-98)6"
"misomai(dead)(1417)(flemington)27-09-98)6"
"pepinello(good)(1200)(belmont)27-09-98)7"
"kim angel(good)(1200)(belmont)27-09-98)8"
"bar screamer(good)(1200)(belmont)27-09-98)8"
"chamoix(good)(1600)(morphettville)27-09-98)7"


the gwbasic program checks for a name and the number of times it appears and deducts the end number from 9 and adds it up and prints a final name and total score.
in some case the number has an a or b attached which program  then checks the second last character on the end.


the data in the dat file is created and appended by a different gw-basic file.
5 rem input "horse.dat"
10 INPUT "filename ";ME$
20 DIM X$(3900),A$(4900)
25 rem  input horse name to search
30 INPUT "Search Name or XXX to end";S$
40 R(I) =0
50 IF S$="xxx" THEN END
55  rem  open horse.dat
60 OPEN "i",#1,ME$
70 IF EOF(1) THEN 230
75   rem input names for checking if they exist
80 INPUT#1,A$(I)
90 Q=Q+1
100 IF LEFT$(A$(I),LEN(S$)) < > S$ THEN 220
110 PRINT A$(I),Q
120 X$= RIGHT$(A$(I),1)
130 J = VAL(X$)
133 F$=LEFT$(A$(I),9)
140 Y$=RIGHT$(A$(I),2)
145 E = E+1
150 Z=VAL(Y$)
155  rem   deducts end number from 9  e.g. 9 minus z
160 IF Z>0 THEN Z=9-Z
170 J = 9-J
180 IF J = 9 THEN J = 0
190 R(I) = R(I) +J+Z
195 rem  horse name   and total score 
200 PRINT R(I),E
210 N=N+1
220 GOTO 70
230 CLOSE#1
232 PRINT F$,R(I)
235 E=0
240 GOTO 30


some  rems
Oh, right it's for Oz horseracing.
yes have been playing with it for years.   the idea is to record best performances and give them a number and then tally them . sort of to try to sort the wheat from the chaff if you forgive the pun.
have it automated in a perl program that does the searching and matching when doing race meetings but to do recreational research the gwbasic score program is invaluable but cant take it to windows 7 64 bit.  so am seeking some help.


Discussion

No Comment Found