Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QBasic convert to VB.NET or C# 3

Status
Not open for further replies.

Serhiy79

Programmer
Jun 9, 2014
3
0
0
US
Hi guys!!! I trying to write some program and
I need to convert this code (for my project), is somebody can help me?

10 OPEN "COM1:9600, E, 7, 2, CS, DS, CD" as #1
20 PRINT #1,"P3";
30 N=240
40 H=95
50 IF N<=H THEN 90
60 PRINT #1,"F+" + STR$(H): N=N-H
70 PRINT #1,"F?": GOSUB 140: H=95-W
80 GOTO 50
90 PRINT #1,"F+" + STR$(H)
100 PRINT #1,"F?": GOSUB 140
110 IF W>0 THEN 100
120 PRINT #1,"R3";
130 END
140 IF LOC(1)=0 THEN 140 ELSE W$=INPUT$(LOC(1),#1)
150 W=ASC(W$)-32
160 RETURN

Thanks !!!
 
Portions of the code appear to be flawed. Is this a school project?

Add water (makes its own sauce).
 
Alt225
Yes, this is a part of school project. I have to write program for robot.
Most confuse me, and probably most important is line 140.
Could you help me , please?
 
I assume your teacher gave you the preceding code snippet so you could understand the underlying concepts. First, make a serious attempt to understand what the code is intended to accomplish (that includes line 140). Then start writing your project in VB.NET or C#. If you run into problems that you cannot solve, post your question in the VB.NET or C# forums and a member may help you find a solution (note: I did not say "GIVE you a solution"). Any more assistance from me, at this point, would inhibit the learning process. (Learning is methodical. You must accomplish each step using your own resources, intuition and intellect.) Good luck!

Add water (makes its own sauce).
 
I did research and got knowledge (QBasic). I believe, that I am on the right track.
Anyway, thanks for your time :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top