Qbasicnews.com

Full Version: Text
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can anybody help, i want to use a data list to print them on every other line.

Code:
screen 19
data "Game name:","Genre:","Language:","Controls:","Players:","Programmer(s):","Graphic Artist(s):"
data "Musician(s):","Cover Artist(s):","Year:","Publisher:","Developer:","Country:","License:"
data "Medium:","Rairity:","Serial:"
for r=3 to 35 step 2
    for f=1 to 17
    locate r,2:print fields$(f)
next
next
rem locate 3,2:print fields$(1)
rem locate 5,2:print fields$(2)
Line (164,30)-(475,50),7,b
line(164,63)-(475,85),7,b
line(164,98)-(475,120),7,bm fields$(17)
dim GameName as string,Genre as string, Langauge as string, Controls as string
dim Players as integer, Programmers as string, GraphicArtist as string
dim Musician as string, CoverArtist as string, Year as integer
dim Publsiher as string, Developer as string, Country as string, License as string
dim Medium as string, Rarity as integer, Serial as integer
for a=1 to 17
    read fields$(a)
next a


sleep

when you run this i get a continous run, can anybody help
Code:
screen 19
dim fields$(0 to 17)
dim GameName as string,Genre as string, Langauge as string, Controls as string
dim Players as integer, Programmers as string, GraphicArtist as string
dim Musician as string, CoverArtist as string, Year as integer
dim Publsiher as string, Developer as string, Country as string, License as string
dim Medium as string, Rarity as integer, Serial as integer
Field_DATA:
data "Game name:","Genre:","Language:","Controls:","Players:","Programmer(s):","Graphic Artist(s):"
data "Musician(s):","Cover Artist(s):","Year:","Publisher:","Developer:","Country:","License:"
data "Medium:","Rairity:","Serial:"
Restore Field_Data
for a=0 to 17
    read fields$(a)
next a
for f=0 to 17
    locate , 2: print fields$(f)
    locate , 2: print ""
    line (8, (f * 32))-(320, (f * 32) + 32),7, b ' y = f * 32, then + 32 for 2 print spaces
next
sleep

I hope this helps. You can just Print "" to make a blank line. ^_~ So the first for next loop was gotten rid of.
Yes that works thanks
Quote:You can just Print "" to make a blank line.
You can also use just Print without an argument to make a blank line - handy for those really lazy typists (like me). Wink

Anonymous

feeling lazy? try

Code:
?

XD
Oh god...I didn't think you guys were THAT lazy...

Anonymous

lazy becomes a very relative term when you have to maintain like 20k+ lines...
And writing PRINT "" is the same as writing LET a = 3. Something unnecessary.
Yeah but the whole ? thing is just "redicurous"!
The ? thing is in BASIC since the 70s. I've been using it since I can remember. The old QB IDE turned ?s into PRINTs, I mean, BC.EXE doesn't recognize ?s. fbc, nevertheless, does.

I don't use it anymore 'cause it looks ugly - I mean, I don't use it for production. For easy'n'fast debugging, I do. Those nice ? lines full of variables :lol:
Pages: 1 2