home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1997
/
ARCHIVE_97.iso
/
text
/
hints
/
vol_09
/
issue_04
< prev
next >
Wrap
Text File
|
1996-01-13
|
4KB
|
101 lines
Hints and Tips
9.4
Basic programs Ö When writing a basic program, one is encouraged to keep
each procedure down to a manageable size. In real life, I suspect that
most of us often end up with procedures covering several screenfulls.
9.4
It can then be very difficult to keep track of what is going on in
multiple-nested loops, even when you have written the Éexitæ from the
loop before going back a line and writing whatever has to be
accomplished within that loop.
9.4
It is much easier to follow the logic if each entry and exit is REMmed
with a reference to the corresponding exit and entry. As an example:
9.4
IF variable% > 100 THEN
9.4
ááREM Start of loop testing variable%
9.4
áá(Lines of program)
9.4
ááFOR loop% = 1 TO 100 : REM Start of
9.4
xyz
9.4
áááá(Lines of program)
9.4
ááááCASE variable2% OF
9.4
ááááááREM Start of testing variable2%
9.4
loop
9.4
áááááá(Lines of program)
9.4
ááááENDCASE : REM End of testing
9.4
variable2% loop
9.4
áááá(Lines of program)
9.4
ááNEXT loop% : REM End of xyz
9.4
áá(Lines of program)
9.4
ENDIF : REM End of loop testing variable%
9.4
(Lines of program)
9.4
It is easy enough to follow the logic in this simple example, but not so
when the (Lines of program) start to mount up! The REMs make debugging
much easier and can always be deleted when youære sure it all hangs
together.
9.4
Note that you need to put the REM at the start of an ÉIF Ö THENæ loop on
a line after the statement; the ÉTHENæ MUST be the last item on the
line.
9.4
Roger Williams <71703.145@compuserve.com>
9.4
Drawing ellipses (9.3 p20) Ö Here is a quicker method of producing an
Éisometric circleæ. The required ellipse can be drawn accurately,
without having to adjust it Éuntil it looks OKæ, and it can be drawn as
one object which can then be colour-filled if required.
9.4
Using the isometric grid in Draw, draw the Éisometric squareæ, which is
actually two equilateral triangles joined at the bases. Then draw an
ellipse centred at the centre of the Ésquareæ and with the control point
as shown in the diagram (below left). This ellipse is the right shape,
but the wrong size and orientation.
9.4
Rotate the ellipse through 30░, and magnify it by 0.8165, which is ┌2î3.
The ellipse now needs to be dragged to the correct position Ö if the
Ésquareæ and the control points were locked to the grid, <ctrl-s> will
finally make the ellipse snap to the correct position.
9.4
Colin Singleton, Sheffield
9.4
Faster PC cards Ö With regard to the recent article in Archive about the
upgrading of issue 1 PC cards with new processors, I would like to say
that I have got Windows running at nearly twice the speed it was, simply
by upgrading from !PC486 version 1.87 to !PCx86 version 1.91. Like
Jochen Konietzko, I havenæt run any speed tests but it is definitely
much faster.
9.4
I would suggest that anyone wanting more speed from the IBM side of a
Risc PC should certainly try out the latest PC Card software before
paying for a processor upgrade! (!PCx86 cost ú10 through Archive,
including printed documentation, but it is also available on Acornæs ftp
site for the cost of the phone call.)
9.4
Paul Hobbs. <101323.1367@compuserve.com>
9.4
RiscáPC replacement keyboard Ö The keyboard of the RiscáPC is a standard
PC keyboard with a standard 6¡pin mini-din plug on the end instead of a
5¡pin din plug. If you want to connect an IBM PC(AT) compatible keyboard
to the RiscáPC, here is a wiring diagram for an adaptor (although these
adaptors can be bought from PC suppliers for about ú5).
9.4
Robert Burnell, Bristol.áuá
9.4