Tuesday, 22 February 2011

Mr Wells, would you mind

Getting our blogs unblocked during school hours? Because otherwise it basically kills any and all plans you had for us to use these things productively.

Sunday, 20 February 2011

Arraise!

An array... is a group of variables, pretty much. In some languages there are built-in array data types, but in Visual Basic they are literally individual variables with similar names.

That's all.

Real-time updating

>>> "I want you all to go back and make changes to what you copied from Richard."
>>> implying people in this class can actually do that
>>> implying people in this class know what loops are
>>> fail

Edit: no offence intended, Grace Steven James Josh Ollie. (Grace's name is highlighted because she's the one to copy off next time, everybody) :P

Thursday, 17 February 2011


Driving me loopy

There are three types of loops used in Visual Basic:

For...Next
Do While
Loop...Until

Each performs basically the same function - running a piece of code multiple times - yet they are each somewhat specialised.

The For...Next loop is used to run a piece of code a set number of times (it is the only loop with a set number of iterations). As its name suggest, it is used when a function needs to be carried out FOR each of several items, for example when doing formatting for each name in a list. The For...Next loop changes a variable every time it runs, so that the function can be specialised for each item.

The Do While loop runs a piece of code if a condition is true. If the loop starts running, here must be a section inside the loop to either alter the condition or break out of the loop, otherwise it will run indefinitely. If the condition is initially false, the Do While loop does not run at all. It could be used instead of a Loop...Until loop nested in an If statement.

The Loop...Until loop is exactly the same as the Do While loop except that it will always run the code inside before checking whether the condition is true; that is, the code inside will always run at least once even if the condition is false.

Loops can be nested inside each other or used in conjunction with control flow statements.