Here's an email I got this morning...

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Pete
Site Admin
Posts: 887
Joined: Sun Dec 07, 2003 9:10 pm
Location: Candor, NY
Contact:

Here's an email I got this morning...

Post by Pete »

Here's an email I got this morning...
Dear,



I want to convert the following DOS TurboBasic/Qbasic xxx.bas file in Visual Basic 6.0. ...



Please answer if can you make this (and for cost price for this) ???



----------------------------------------- xxx.bas ---------------------------------------------



1000 META%=31:ENTOLH%=8:KERDMON=0:KERD6=0:KERD9=0:_MOUSEX%=0

1010 CLS:MET6%=0:MET9%=0:BSX%=8:BS%=0:N=0:X=0:EPAN%=0:T1=TIMER

NIL$="SIGNALL.TRB":NIH$="SIGNALH.TRB"

1050 OPEN "R",#6,NIL$,4

OPEN "R",#9,NIH$,4

FIELD #6,4 AS I6$

FIELD #9,4 AS I9$

FOR X6=1 TO 9999!:GET #6

IF EOF(6) THEN 1160

NEXT X6

1160 N6=X6-52:X6=0:CLOSE #6

FOR X9=1 TO 9999!:GET #9

IF EOF(9) THEN 1190

NEXT X9

1190 N9=X9-52:X9=0:CLOSE #9



1620 OPEN "R",#6,NIL$,4

1630 FIELD #6,4 AS I6$

FOR X6=1 TO 9999!

GET #6

IF EOF(6) THEN 1699

1650 IF X6>N6 THEN 1680 ELSE 1690

1680 IF X6=N6+6 THEN P40$=I6$

IF X6=N6+7 THEN P41$=I6$

IF X6=N6+23 THEN P50$=I6$

IF X6=N6+24 THEN P51$=I6$

IF X6=N6+35 THEN N691$=I6$

IF X6=N6+36 THEN N692$=I6$

IF X6=N6+40 THEN P60$=I6$

IF X6=N6+41 THEN P61$=I6$

IF X6=N6+42 THEN BS6$=I6$

1690 NEXT X6

1699 CLOSE #6



1920 OPEN "R",#9,NIH$,4

1930 FIELD #9,4 AS I9$

FOR X9=1 TO 9999!

GET #9

IF EOF(9) THEN 1999

1950 IF X9>N9 THEN 1980 ELSE 1990

1980 IF X9=N9+6 THEN P70$=I9$

IF X9=N9+7 THEN P71$=I9$

IF X9=N9+23 THEN P80$=I9$

IF X9=N9+24 THEN P81$=I9$

IF X9=N9+35 THEN N961$=I9$

IF X9=N9+36 THEN N962$=I9$

IF X9=N9+40 THEN P90$=I9$

IF X9=N9+41 THEN P91$=I9$

IF X9=N9+42 THEN BS9$=I9$

1990 NEXT X9

1999 CLOSE #9



2600 LOCATE 1,1:PRINT SPC(4);"SYMBOL B B(C-0) B(C-1) S S(C-0) S(C-1)"

2920 N69$=N691$+N692$:N96$=N961$+N962$:BS6=CVS(BS6$):BS9=CVS(BS9$)

P40=CVS(P40$):P41=CVS(P41$):P70=CVS(P70$):P71=CVS(P71$)

P50=CVS(P50$):P51=CVS(P51$):P80=CVS(P80$):P81=CVS(P81$)

P60=CVS(P60$):P61=CVS(P61$):P90=CVS(P90$):P91=CVS(P91$)

2925 PRINT " 3:";N69$;

PRINT USING " #";BS6;SPC(2);:PRINT USING "####.#";P40;SPC(2);P41;

PRINT USING " #";BS9;SPC(2);:PRINT USING "####.#";P70;SPC(2);P71

PRINT " 2:";N96$;

PRINT USING " #";BS6;SPC(2);:PRINT USING "####.#";P50;SPC(2);P51;

PRINT USING " #";BS9;SPC(2);:PRINT USING "####.#";P80;SPC(2);P81

PRINT " 1:";N69$;

PRINT USING " #";BS6;SPC(2);:PRINT USING "####.#";P60;SPC(2);P61;

PRINT USING " #";BS9;SPC(2);:PRINT USING "####.#";P90;SPC(2);P91



2930 IF EPAN%=5 AND MET6%=5 THEN ENTOLH%=6 ELSE IF EPAN%=5 AND MET9%=5 THEN ENTOLH%=9 ELSE IF EPAN%=>1000 THEN 1010

2931 IF P40=0 OR P41=0 OR P50=0 OR P51=0 OR P60=0 OR P61=0 OR P70=0 OR P71=0 OR P80=0 OR P81=0 OR P90=0 OR P91=0 THEN 2935 ELSE 2940

2935 CLS:GOTO 1050



2940 LOCATE 6,1:PRINT EPAN%;" ";MET6%;" ";MET9%;" ";BSX%;" ";ENTOLH%;" ";_MOUSEX%

LOCATE 6,36:PRINT USING "####.##";KERDMON

LOCATE 6,44:PRINT USING "####.##";KERDEUR



2950 Z$=INKEY$:IF Z$=CHR$(13) THEN 1010 ELSE IF Z$=" " THEN 2935 ELSE IF Z$="6" THEN 4660 ELSE IF Z$="9" THEN 4990 ELSE IF Z$=CHR$(27) THEN 5000 ELSE 2960



2960 IF MET6%=META% AND P40=P71 AND P50=P81 AND P60=P91 AND P41=P80 AND P51=P90 THEN 4600

IF MET9%=META% AND P41=P70 AND P51=P80 AND P61=P90 AND P50=P71 AND P60=P81 THEN 4900 ELSE 2970



2970 IF P40=P71 AND P50=P81 AND P60=P91 AND P41=P80 AND P51=P90 THEN BSX%=6:MET6%=MET6%+1:MET9%=0:GOTO 2980

IF P41=P70 AND P51=P80 AND P61=P90 AND P50=P71 AND P60=P81 THEN BSX%=9:MET9%=MET9%+1:MET6%=0:GOTO 2980

2980 DELAY 1:EPAN%=EPAN%+1:GOTO 1050





4600 IF ENTOLH%=9 THEN 4660 ELSE 4665

4660 BEEP:LEP$=TIME$

B6$="BUY 2 X FDAX AT "

LOCATE 16,45:PRINT LEP$;" ";B6$;:PRINT USING "####.#";P61

OPEN "O",#1,"AOET6.TXT"

PRINT #1,B6$;

PRINT #1,USING "####.#";P61

CLOSE #1

ENTOLH%=6

KERD6=P61:_MOUSEX%=_MOUSEX%+1

IF KERD6>0 AND KERD9>0 THEN KERDMON=KERDMON+(KERD9-KERD6)

4665 MET6%=0:BS%=6

GOTO 2970



4900 IF ENTOLH%=6 THEN 4990 ELSE 4995

4990 BEEP:LEP$=TIME$

K9$="SELL 2 X FDAX AT "

LOCATE 19,45:PRINT LEP$;" ";K9$;:PRINT USING "####.#";P91

OPEN "O",#2,"AOET9.TXT"

PRINT #2,K9$;

PRINT #2,USING "####.#";P91

CLOSE #2

ENTOLH%=9

KERD9=P91:_MOUSEX%=_MOUSEX%+1

IF KERD6>0 AND KERD9>0 THEN KERDMON=KERDMON+(KERD9-KERD6)

4995 MET9%=0:BS%=9

GOTO 2970





5000 T2=TIMER

T=T2-T1:PRINT USING "#####.#";T

PRINT "END..OK":END

------------------------------------------------------------



Thank you,

Regards,



Elec

Christos Papathanasiou

Maria Papathanasiou

elec@otenet.gr
Their email address was: elec@otenet.gr

I think that means they're from Greece. Anyway, I don't know TurboBasic and I know only rudimentary Visual Basic. I don't know about you guys.
Last edited by Pete on Wed Oct 20, 2004 11:38 am, edited 1 time in total.
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

Looks pretty easy to convert...if I had the time, I'd take it up but I don't. :(
Stormy

Post by Stormy »

Sounds like easy money ! :D For the unknown commands you could use google or something like that...
Anonymous

Post by Anonymous »

Which unknown commands? I don't see anything unknown... :?
Stormy

Post by Stormy »

FIELD for example... maybe i read the documentation of qbasic not properly ;)
Anonymous

Post by Anonymous »

Here: FIELD ;)
User avatar
Pete
Site Admin
Posts: 887
Joined: Sun Dec 07, 2003 9:10 pm
Location: Candor, NY
Contact:

Post by Pete »

I would do it if I weren't so damn busy all the time... I have had about two hours of free time since Sunday, because of constant meetings, classes, homework, video shoots, editing meetings, required lectures, luncheons, etc., etc., etc.

I also don't have Visual Basic 6....not that I wouldn't be able to "find" it somewhere, heheh.

But I definitely encourage one of you to do it if you've got the time and the know-how. Like someone said, it sounds like easy money.
Nelson

Like how you mention "required lectures"

Post by Nelson »

As, of course, there are many lectures that you can skip without risking a fail...
Post Reply