J.E.Lawrie HINTS-3. v.3 Print Format The Z88 manual says nothing about this and the books can be a little confusing. It concerns how figures will be presented in Basic. The default format ( the way it is unless you change it! ) is &0000090A If this is changed to &0002000A then all figures will be integers - no decimal places. If &0002020A is used you will get two decimal places and successive numbers on new lines will have the decimal points in line e.g 98.6743 will be 98.67 and 25 will be 25.00 and 345.5672 will be 345.57 - nice & tidy! So, the third pair of figures after & is the number of decimal places - this is especially useful in any financial programs of course. At the start of the Basic listing insert @%=&2020A (leading zeros are ignored). If you only want whole numbers put @%=&2000A . You can try these out in Basic as direct commands (NOT in a listing) by entering a format & then testing it out by typing P. followed by a figure to test the format. The last two figures are the number of spaces which will be used in the printout of figures. Taking `0A' as in the above - this equals 10 in hexadecimal, so the last figure will always be in the 10th place from your last printed character. Error trapping Correct error trapping in Basic is very important. Every Basic listing should start with a line as follows - ON ERROR:dummy=INKEY(0):PROCerr:REPORT:P."in line ";ERL:END At, or near the end of the listing put - DEFPROCerr:CLOSE#0:@%=&2020A:VDU1,127,1,67,1,83:ENDPROC This will ensure 1) that when you ESCape from the program, or an error causes it to fail, all will be reset to the default values and 2) that if an "error loop" should occur, which might need a soft reset, you can avoid this by pressing the INDEX key and then <>KILLing the instantiation in the suspended activities. Printing from Basic (1) It is possible to get a printout of a Basic listing by typing L. and, before hitting the ENTER key, type #+P The printer must be ready for printing of course. At the end, type #-P One can also put an instruction in the listing to get a printout of what appears on the screen. How it appears on paper depends on the way the program is constructed. The line to insert is - OSCLI("CLI #+P~E"):d=INKEY(0) EXACTLY like that! Leaving the Filer It is possible to leave the Filer in a number of ways - it is always tempting to press the INDEX key or []P or []B ([] means square key) DON'T DO IT. Always leave the Filer by pressing the ESCape key. When cataloguing the files always run to the end of the list. If you ignore these warnings then sooner or later you will get the "in use" message when you try to move, erase or load one of the files. The only way to eliminate this block is to do a Soft Reset. END Back to HINTS-INDEX