[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2007-08-28T18:34:25-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2422 2007-08-28T18:34:25-05:00 2007-08-28T18:34:25-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14996#p14996 <![CDATA[Possible to store an array in a sub?]]>
Paging means that there is more than just one screen to draw on. The visible page is what you see, and hidden pages are the extra ones. It helps because you can draw all your graphics on the hidden page, and then qucikly copy that page over to the visible page, greatly reducing flicker.

The reason why Screen 7 has paging and Screen 13 doesn't is that the pages in Screen 7 take up less memory than a Screen 13 page. Screen 7 only supports 16 colors (4bit mode), so a screen 7 page only takes up half the memory as a Screen 13 page. So the excess memory provides for another page or two.

You can still do paging in Screen 13, but you have to either know how to hack the VGA or how to code it in assembler. The easiest way is to use library that'll do it for you. Some libraries also support higher resolutions that QB doesn't. A list of some good QB libraries can be found here.

Statistics: Posted by Joe — Tue Aug 28, 2007 6:34 pm


]]>
2007-08-28T18:18:09-05:00 2007-08-28T18:18:09-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14995#p14995 <![CDATA[Possible to store an array in a sub?]]>
Besides, there has to be something better than using a bit map for a title, lol...any suggestions??

And yes I am using screen 13. I only need help with my title, i want to make it look cool. All the other stuff is fine, I cud just use lines and colors and that part is good.

Another quick question: How do I know what screen to use for my programs? And what does it mean that screen 7 has pages?

Statistics: Posted by Raspberrypicker — Tue Aug 28, 2007 6:18 pm


]]>
2007-08-28T15:39:36-05:00 2007-08-28T15:39:36-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14992#p14992 <![CDATA[Possible to store an array in a sub?]]> Statistics: Posted by BadMrBox — Tue Aug 28, 2007 3:39 pm


]]>
2007-08-27T19:40:10-05:00 2007-08-27T19:40:10-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14983#p14983 <![CDATA[Possible to store an array in a sub?]]>
Thanx guys, all my arrays are finally in their seperate sub. =)

Now all I gotta work on is my graphics. :(
Man, there are so many bugs in my graphics, its not even funny...guess im gonna be debugging for a while, lol.

Statistics: Posted by Raspberrypicker — Mon Aug 27, 2007 7:40 pm


]]>
2007-08-27T09:20:05-05:00 2007-08-27T09:20:05-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14965#p14965 <![CDATA[Possible to store an array in a sub?]]>
I think that's the only part I didn't do...plus DIM SHARED. So basically when I add SHARED to it, it lets me "share" the array between subs, ok I got it now. :D
Don't use SHARED if you don't have to. Pass everything as arguments into the sub. Abusing SHARED can easily lead to spaghetti code. That's my advice, even though I don't follow it all the time. :)

Statistics: Posted by Joe — Mon Aug 27, 2007 9:20 am


]]>
2007-08-27T08:43:32-05:00 2007-08-27T08:43:32-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14964#p14964 <![CDATA[Possible to store an array in a sub?]]> Statistics: Posted by ThemePark — Mon Aug 27, 2007 8:43 am


]]>
2007-08-27T01:34:14-05:00 2007-08-27T01:34:14-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14963#p14963 <![CDATA[Possible to store an array in a sub?]]> Statistics: Posted by Dr_D — Mon Aug 27, 2007 1:34 am


]]>
2007-08-27T01:29:57-05:00 2007-08-27T01:29:57-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14962#p14962 <![CDATA[Possible to store an array in a sub?]]> Statistics: Posted by k7 — Mon Aug 27, 2007 1:29 am


]]>
2007-08-26T19:23:07-05:00 2007-08-26T19:23:07-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14959#p14959 <![CDATA[Possible to store an array in a sub?]]> , silly me. If you do it like that then you don't need to have the array shared.
But anyway, you can either do like this;

Code:

DECLARE SUB MySub (Array%())DIM SomeStuff%(5,5)MySub SomeStuff%() SUB MySub(Array%()) FOR A=1 TO 5  FOR B = 1 to 5   Array%(A,B) = A*B  NEXT B NEXT A END SUB 
or like this

Code:

DECLARE SUB MySubDIM Shared SomeStuff%(5,5)MySubSUB MySubFOR A=1 TO 5  FOR B = 1 to 5   Array%(A,B) = A*B  NEXT B NEXT A END SUB 
I like the later way rather than the first.

Statistics: Posted by BadMrBox — Sun Aug 26, 2007 7:23 pm


]]>
2007-08-26T16:02:47-05:00 2007-08-26T16:02:47-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14956#p14956 <![CDATA[Possible to store an array in a sub?]]>
So when I pass it to the sub does this part go into the main program or sub program?

MySub SomeStuff%()

I think that's the only part I didn't do...plus DIM SHARED. So basically when I add SHARED to it, it lets me "share" the array between subs, ok I got it now. :D

Statistics: Posted by Raspberrypicker — Sun Aug 26, 2007 4:02 pm


]]>
2007-08-25T23:51:07-05:00 2007-08-25T23:51:07-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14951#p14951 <![CDATA[Possible to store an array in a sub?]]> Statistics: Posted by BadMrBox — Sat Aug 25, 2007 11:51 pm


]]>
2007-08-25T21:48:42-05:00 2007-08-25T21:48:42-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14950#p14950 <![CDATA[Possible to store an array in a sub?]]>

Code:

DECLARE SUB MySub (Array%())DIM SomeStuff%(5,5)MySub SomeStuff%()SUB MySub(Array%())FOR A=1 TO 5 FOR B = 1 to 5  Array%(A,B) = A*B NEXT BNEXT AEND SUB
See if you can make heads or tails of that, and then post your results ;)

Statistics: Posted by Patz QuickBASIC Creations — Sat Aug 25, 2007 9:48 pm


]]>
2007-08-25T20:37:15-05:00 2007-08-25T20:37:15-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14949#p14949 <![CDATA[Possible to store an array in a sub?]]>
Thanks in advance...even if there is no solution my program will be fine.

Statistics: Posted by Raspberrypicker — Sat Aug 25, 2007 8:37 pm


]]>