Visual Basic Tutorial - Part 6
In tutorial four, we covered loops and subs. Whew, what fun! Here are your top questions:
Q1. Where can I find more information about loops?
Have you tried visiting an asylum?
Seriously though, and all NHS jokes to one side - loops come in many different shapes and sizes. You have "Do While" loops, "Do Until" loops, "For-Each-Next" loops and something else- erm, I can't remember them all.
But you can find full descriptions of the various loops by consulting the VB help file. Just lookup "Loops" in the available index and you'll spot the many different options.
Q2. So, in brief, what is a sub?
A sub can be defined one of two ways. Let's do them both.
(a) Definition of Sub
A block of code that can be called by tapping in its name. For instance, if your Sub is called "EndProgram" - as in tutorial four - just type EndProgram anywhere in your code to run it. The Sub may also accept "arguments" or "parameters" - these are simply extra bits of information you pass to the Sub. For instance, you may pass it a username so it can say, "Get Lost <USERNAME>!" instead of an impersonal and rather less harsh, "Get Lost, Geek!". What an advantage.
(b) Definition of Sub
Part of usual wage given up front. Borrow. Lend. Scrimp. Debt. Bottomless pit. Alcoholism.
Q3. Hi Karlie! Me again. That picture isn't of you now, is it?
OK, it's not of me. It's all one big hoax. A scandal! It's a fake. I'm a phoney. A fraud. One gigantic scam! Haha. HAHA! HAHAHAHA!!
Page 5 of 7