QBASIC 8 - over to you Once again I'm going to change direction completely with a tutorial file that has nothing at all in common with any of the others. Don't worry though, it's still on the subject of QBASIC - just from a slightly different perspective. The idea of this tutorial file is that I'm going to give you five or six tasks to do, and in the next five or six tutorials I will show you how I would have gone about the task, as well as the normal progression through new commands, etc. Task number one: write a program that can gauge typing speed. You'll need to work out some way of measuring time passed. This can be done using either the TIMER variable which always holds the number of seconds since midnight, or by using an ON TIMER command to GOSUB a subroutine every time a set time elapses. Look these up in the QBASIC help file and you should find enough information to get you started. Task number two: make an electronic diary which stores a record for each day. The records must be easy to recall and you could implement a password to make sure that only the correct user can access the files - you could even have a go at some form of encryption, but that could be difficult. You'll need a system which finds out what the user wants to do and does it; they might want to add an entry, view an entry, etc. You will need to work out a way of saving each day's entry using the OPEN command discussed in QB7. You will probably need to use the DATE$ variable to give you the date, then convert this into a filename so that every day's entry is stored in a separate file. Task number three: create a program which tests coordination using the joystick. Obviously you'll need a DOS-compatible joystick attached, but other than that the STICK() command is going to be pretty important. I can't give you much advice on this as I've not used the command for a while; I'm going to cheat and give you a program that I wrote a while back. You will probably need to do some simple graphics to show the user how well they're doing; look up PSET, LINE and SCREEN in the QBASIC index. Task number four: write a program to generate six lottery numbers, making it look as impressive as possible. You will need to use the RANDOMIZE command otherwise the numbers will be the same each time! Task number five: create a program which can draw a graph from a formula. Don't worry about getting the user to input a formula; program it in. Just try and make the program easy to adapt to plot different formulas. There are two ways of doing this; if the formula is of the form y= then you can simply use a FOR...NEXT loop to cycle through all the values of x and then use y= and PSET(x,y),1 to plot the relevant value. Otherwise you should use two nested FOR...NEXT loops to scan the screen and and IF THEN PSET(x,y),1 to plot a pixel if the expression is true. You may have to include some commands to skip the check if it would create an error; for example, if the formula would involve dividing by zero then you'll have to skip the check or the program will end. Task number six: create a spirograph-style program which will ask you for a couple of numbers then go on to draw a pretty pattern. I'm not entirely sure how this would work but I reckon you should look at combinations of SIN function, COS functions and the MOD command, and of course you'll have to familiarise yourself with the PSET command. You could also use the PSET command in combination with the POINT command to achieve some more interesting effects; see what you can do. That'll do for now; get programming. As I said before, I'll cover one of these tasks every lesson from now on, so if you're stuck on how to do something, the solution should be forthcoming. For now, though, do what you can and, more importantly, learn as much as possible about QBASIC! Good luck!