[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-09-13T21:00:28-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2438 2007-09-13T21:00:28-05:00 2007-09-13T21:00:28-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=15184#p15184 <![CDATA[List of fancy little QuickBasic coding tricks]]>
Go to: www.EthanWiner.com
Select "Programming" from the top menu.
Near the bottom of the page download a zip file with a free version in text mode of his book "BASIC Techniques and Utilities Book."
Put all this into a separate directory (folder).
You'll find a wealth of information there.

Good luck..... Moneo

Statistics: Posted by moneo — Thu Sep 13, 2007 9:00 pm


]]>
2007-09-11T21:23:55-05:00 2007-09-11T21:23:55-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=15148#p15148 <![CDATA[List of fancy little QuickBasic coding tricks]]>
Thanks mac, this is exactly what I was talking about, so it should be very useful in my learning process. And yeah, it should take me a while to go through it. :P

Statistics: Posted by ThemePark — Tue Sep 11, 2007 9:23 pm


]]>
2007-09-11T20:52:51-05:00 2007-09-11T20:52:51-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=15145#p15145 <![CDATA[List of fancy little QuickBasic coding tricks]]> http://www.network54.com/Forum/178387/m ... 1069000429

Otherwise, as I said, just look at code. You can see a lot of my programs at
http://www.network54.com/Forum/178387/m ... 1152556572

but you are better off looking at programs from many programmers, not just a few. So here are the works of many programmers:
http://www.network54.com/Forum/178387/

(Heh - That should keep you busy awhile)

Mac

Statistics: Posted by Mac — Tue Sep 11, 2007 8:52 pm


]]>
2007-09-11T20:25:46-05:00 2007-09-11T20:25:46-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=15141#p15141 <![CDATA[List of fancy little QuickBasic coding tricks]]>
You have a good point, and the few tricks I've noticed so far have also been from looking at other people's codes. For instance, using semicolon instead of plus in a print sentence makes it look cleaner to me, something I had never thought of doing.

But if there has never been compiled such a list, are there any coding examples that people could give, that contain some sort of trick, either to make the program work faster, or look cleaner? Perhaps code from posts in here? The more little tricks I learn, the better I can tidy up my code and the less likely I should be with making spaghetti code, i.e. by gaining coding experience through example.

Statistics: Posted by ThemePark — Tue Sep 11, 2007 8:25 pm


]]>
2007-09-11T15:56:06-05:00 2007-09-11T15:56:06-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=15125#p15125 <![CDATA[Re: List of fancy little QuickBasic quirks]]>
"show-off"?? LOL!

Anyway, I haven't seen any collection of coding tricks. Mostly, I pick them up from reading other people's code. Maybe someone like Solitaire brings my attention to INPUT$ which I had previously ignored. So I start using it where I might have previously coded
DO: K$=INKEY$: LOOP WHILE K$=""

So I would say to just keep reading other people's code and look for good ideas. I learn one every day. For example, I want to split a string which I know has one delimeter comma+space and a left and right side length >0.
Possibly "abc, def" into "{abc} {def}".

For a long time I would have coded this:

Code:

k$ = "abc, def"y = INSTR(k$, ", ")PRINT "{"; LEFT$(k$, y - 1); "} {"; RIGHT$(k$, LEN(k$) - y - 1); "}"
But lately, having seen the MID$ trick, I code this

Code:

k$ = "abc, def"y = INSTR(k$, ", ")PRINT "{"; LEFT$(k$, y - 1); "} {"; MID$(k$, y + 2); "}"; 
A lot cleaner. The point: everyone can benefit from studying the code that others have written.

Mac

Statistics: Posted by Mac — Tue Sep 11, 2007 3:56 pm


]]>
2007-09-11T20:22:28-05:00 2007-09-11T14:37:02-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=15123#p15123 <![CDATA[List of fancy little QuickBasic coding tricks]]>
BASICally what I'm wondering is if there is a book or a website that deals with all the little fancy things in QuickBASIC, that set the line between a so-and-so programmer, and a show-off programmer.

Like for instance, Mac's use of INPUT$(1) in http://www.petesqbsite.com/forum/viewto ... 5080#15080

Or how Dav is able to put a comment at the end of a DATA sentence by using a colon in http://www.petesqbsite.com/forum/viewto ... 5039#15039

Those little things that is not common knowledge and that is perhaps not always found in the QuickBasic help, but that can really add something to a program, and make it better and easier to read. That is the kind of list that I'm looking for.

Statistics: Posted by ThemePark — Tue Sep 11, 2007 2:37 pm


]]>