IonicWind Software

Creative Basic => Console Programs => Topic started by: GWS on October 29, 2007, 11:14:28 AM

Title: Print output to selected lines
Post by: GWS on October 29, 2007, 11:14:28 AM
Here's a small example of positioning output on selected lines in a console window ..

openconsole
def x,y:float
def dummy:string

cls

locate 25,10
print "Enter -1 to Quit"

do

locate 5,10
print space$(60)

locate 5,10
input "Enter a Number - ", x

if (x < 0) then goto Exit

locate 7,10
print "Square Root of ",x,"   = ", sqrt(x)

locate 16,10
print "Press Enter to calculate another square root .. "

input dummy

locate 7,10
print space$(60)

until x < 0

do:until inkey$<>""
Exit:
closeconsole
end


best wishes, :)

Graham