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
Seb McClouth
Post
by Seb McClouth » Wed Jun 08, 2005 2:48 pm
I was wondering sumfin. If it would be possible to do the following:
Code: Select all
TYPE PARAM
POS as integer
MODE as integer
LINES as integer
END TYPE
DIM SHARED PARAME(50) as PARAM
PARAME(1).POS = 1
PARAME(2).POS = 4
I don't have QB at hand so... if you plz...
grtz
Seb
Z!re
Veteran
Posts: 887 Joined: Wed Aug 04, 2004 11:15 am
Post
by Z!re » Wed Jun 08, 2005 3:02 pm
Yes.
Also, array index start at 0, learn to use it.
I have left this dump.
Seb McClouth
Post
by Seb McClouth » Thu Jun 09, 2005 2:42 am
Alrighties... I know it starts at 0 but it's so much easier to use 1 to 50 then 0 to 49, I just hate (read: dislike) the fact using the line command in whatever screen mode you have to say line (0,0)-(639,479) instead of Line (1,1)-(640,480), if you get what I mean.
But anywayz, thx!!!
Grtz
Seb
Deleter
Veteran
Posts: 119 Joined: Sat May 07, 2005 7:31 pm
Post
by Deleter » Thu Jun 09, 2005 2:14 pm
well, then you can define it like this and not waste memory:
Dim Shared Parame(1 to 50) as PARAM
that way it starts at one and contains 50 elements
Seb McClouth
Post
by Seb McClouth » Fri Jun 10, 2005 4:05 am
Okay good one. Hehehe, and I just changed my weekdays(7) to weekdays(6) in my qbinux-source. But thanks for the hint!!