Question by Ohthebrave: What is the code to draw a horizontal and vertical line in FbIde(Qbasic) windows version?
Using this I can draw a line
“Line (60,60)-(150,150),8″

but it does not turn out on the vertical axis nor horizontal how would i do that? anyone

Most clear, and tested answer 5 stars.

Best answer:

Answer by DynaSoar
Your example draws a diagonal line from the start point located at 60 = x and 60 = y to the end point located 150 = x and 150 = y. To create a vertical line and a horizontal line requires two separate instructions. Try the following code snippet by running the code as you enter each line separately to observe each effect. Note: You fail to mention your SREEN # so I used EGA 7 to keep the image as large as possible with color coded lines.

SCREEN 7
LINE (60, 60)-(150, 150), 8 ‘Grey diagonal line
LINE (60, 60)-(60, 150), 1 ‘Blue vertical line
LINE (60,150)-(150, 150), 2 ‘Green horizontal line

What do you think? Answer below!