(Example
3)
The
following program draws a rectangle with a side length
of
240
units.
10
MODE GR
20
SO=INTC120*SORC3))
30
LINE
%2.
240.0.
120.
-SO.
0 . 0
40
MODE TN
The
lines indicated
with
n are as follows.
***
LINE
1-16
***
--------------
---------
----~N=1
·
··---
--
-------------------------------------------
--
-----------------
-
-------------------N=2
..
___________________________________________________________
N = 3
·---
___________________________________________
N=4
..
__
__
________________ ________ . _______ N=5
..
_________________
_
___________
N=6
-------------------------~=7
__________
__
__________
N=8
·-
_____
.
_________
_
____
N = 9
·-
_________________
N= 1 0
·-
____
_____
_____
_ N= 1 1
_______________
N = 1 2
·-
- - - - - - - - - - - - _N= 1 3
·-
- - - - - - - - - - -
_N=14
·-
_
____
______
N=15
__
___
______
N=16
2.7.6.2
RUNE
.
.........
................
. .
......
.. ..
.
..
.
...
...
..
(abbreviated format: RL.)
I Format I
RUNE
x
1
,
Y1
<,
X2,
Y
2
,
..
. xi, yi .
..
>
Function
Example
RUNE
%n,
xl,
Yl,
<,
x2,
Y2
,
...
'xi,
yi
...
>
n
.......
Integer from 1
to
16
xi
......
Number indicating
the
X coordinate (
-480
to
480)
yi
......
Number
indicating
the
Y coordinate (
-999
to
999)
This
statement
draws a line from the
current
pen location
to
the
location indicated
by
relative coordinates x
1
, y
1
,
then
draws a line from
that
point
to
the location
indicated
by
relative coordinates x
2
, y
2
, and so on. n
is
the
same as for
the
LINE
statement.
This program draws
the
same rectangle
as
example 3 above.
10
MODE GR
20
SO=IN
T C
120*SOR
C3))
30
RLINE
%1.240.
0.
-12
0 .
-SO.
-12
0 .
SO
40
MODE TN
Initial
pen location
Initial
pen location
-------~--
,
(120.
-120/3)
,'
I
...
-- ../
I '
I \
I
I
I
I
,
..
---~:
-----~--
-
-
~--'--
--
Figure drawn •)40.0:
.·:120.
-so:-
.·: 0.0
:·
by
LINE
·-
----
-.------
---
·------
CO
,Q)
I
I
I
\
I
240
/
120
\'
(120.
-120
/3)
'
\
120/3
I
\
I
I
I
I '
.,..I"
' I
I
I
I
I
'
\
'
\
,
,
I
Figure drawn
·:24o.
-
6':
-:~-=--iio.
~sa·::
-.
·-~~\2o."so>
by
R
Ll
NE
• •
--'
-- - -- -
--
--
86------------------
----
--------------------------------
--------
------
---