SB BBC @ GBR Oldie hints/tips #175-178 Hints and tips from the archives of Wakefield BBC Micro User Group... 175. TRACE ~~~~~ An associate had cause to use this rarely-needed command. Having checked down the screen, a point was reached at which he was sure his program worked, so he knew the error was further down. Looking at the TRACE command he observed that: TRACE caused the computer to report only line numbers below . However, on entering the command he found that only lines ABOVE were reported. He had interpreted "BELOW" as meaning BELOW in the listing; ie HIGHER line numbers. Evidently the message intended was that TRACE would cause the computer to report only line numbers LESS than . - Work this one out!! 176. Simple menu selection ~~~~~~~~~~~~~~~~~~~~~ When selecting one item from a screen menu, there is no need for each menu option to be tagged with a number; it could just as easily be a letter. Eg L = LOAD, S = SAVE, X = EXIT, etc.. You can then easily translate this into a number, so that you can use ON ... GOTO/GOSUB . A useful refinement would be to replace the GET$ with CHR$(GETAND&DF) , so that the Caps/Shift Lock state wouldn't matter. 10 REPEAT:G%=INSTR$("LSX...etc.",GET$):UNTILG% 20 ON G% GOTO 110,180,250 etc. 177. Remarks & all that ~~~~~~~~~~~~~~~~~~ Have you tried putting remarks in your programs without REM....; it can be done if you slot them in between ENDPROC and DEFPROCabc after the END of your program, e.g. Lines 10 to 240 Program Line 250 END Line 500 DEFROCxyz Line 620 ENDPROC Line 700 This is a sample of what you can Line 710 do, with no REM's required. Line 800 DEFPROCefg, etc, etc 178. Discy flopps ~~~~~~~~~~~~ Virtually all floppy discs come with glowing reassurances like 'Life-Time Guarantee' or 'Fully Certified', so why do some discs cost many times the price of others? Floppy discs have a surface noise factor, rather like the hiss on an ordinary audio tape which can, under some circumstances create errors and make the disc unreadable as the computer cannot distinguish between noise and data. Data pulses are inevitably recorded at different levels and the clipping level is the lowest level of a data pulse compared to the level of the average pulse; the normal standard is 40% which should work well provided the read/write head is exactly centred on the recorded track. This is because a data pulse whose strength is 40% of the average pulse will be well above the disc noise or 'hiss'. However, when a different drive is used, which may have different head alignment, the head may veer off the track. When this happens the pulse strength falls but the noise remains constant; some of the lowest recorded pulses may become dangerously close to the strength of the noise and become indistinguishable and even lost, causing an error. The best discs use a clipping level of 75% which keeps the lower pulses well away from the noise even when the head is off track. When manufacturers talk of certification they ought to point out that there are two ways of certifying a disc; full surface and track only. The American National Standards Institute (ANSI) specification only calls for track certification but ideally the disc should be certified on and between the tracks to prevent an unrevealed flaw growing into the track and ruining the data. The best discs are full surface certified. Finally, discs are coated with millions of tiny particles of metal oxide and ideally that is where they should stay; on the disc. Disc manufacturers coat the discs with a protective layer but with wear and ageing this can break up leading to the oxide depositing itself onto the drive heads. On some of the best discs the manufacturers try to coat even individual particles which leads to a more durable and reliable disc. When discs can be bought so cheaply it's easy to think "if it fails just replace it", but a failed disc can mean an awful lot of lost data. Lifetime Guarantees should and can mean just that, otherwise they are just about as useful as a warranty on a parachute! 73 Rick G4BLT @ GB7WRG