Download Dimensions

Transcript
0 \ spreadsheet
19
- cell
calculation words
22
cl 06/31/84 \ spreadsheet
20
0 \ spreadsheet
- cell
calculation words
23
cl 07/04/84 \ spreadsheet
- cell rarker positioning words
cl 07/02/84
1
\ talc forrula of cell if i t has : right-arrow
\ rove cell marker right 1 cell
2 : calculate
3 @ ldup if execute then ;
\ one ( cell addr -- 1
col-disp P 3 =
\ marker in right rost cell ?
4
if cur-col @ 4 + col-rax 0 \ if so i s i t the l a s t cell (2)
5 : talc-c/r
\ talc colurns then rows
\ rove display column right one
if 1 cur-co1 +!
6 r~w-rax 0
di s-col-change
\ scroll right
7 do col-rax 0
then
\ if nark a t colurn I ignar
8
do j i c e l l s calculate loop \ get forrula and execute i t
else
\ if rark not a t right most
9 loop ;
erase-cell-rarker
\ colurn of display rove it
0
1 col-disp +!
\ right one cell without
1 : talc-r/c
\ cal rows then colurns
then
\ scroll
2 col-nxO
place-cel 1 -rarker ;
\ draw new cell narker
3 do row-rax 0
4
do i j c e l l s calculate loop \ get forrula and execute i t
5 loopi
1
2 : talc-cells
3
4
5
6
7
8:
9
0
1
2
3
4
order-f lag @
if talc-clr
else talc-rlc
then ;
\
\
\
\
- cell
rarker positioning words
deternine which to talc f i r s t : up-arrow
by state of order-flag
row-disp e 0=
if 1 talc cols then rows
if cur-row @ 0 0
if 0 talc rows then cols
if -1 cur-row +!
di s-row-change
then
else
erase-cel 1-barker
-1 row-disp +!
then
place-cell-marker ;
order
\ prompt user for talc order
posl
Specify calculation order'
pos2
Row/Coi(O) or Col / R a i i ( l ) : '
key ascii 1 =
\ get response and set flag
if true
\ accordingly
else false
then order-flag ! ;
.'
.'
\
\
\
\
\
\
\
\
\
\
c l 07/02/84
rove cell rarker up 1 cell
i s cell at top display pos. ?
if so are we a t the top of
the spreadsheet ?
if not rove up a
cell and scroll upward
if already a t top ignor
if mark not a t top of display
erase nark
move up one cell
\ draw new cell rarker
r
21
24
6 \ spreadsheet - cell narker positioning words
cl 07/02/84
cl 07/02/84 \ spreadsheet - cell narker positioning words
1
2 : left-arrow
\ rove cell marker l e f t 1 cell
: down-arrow
'\ rove cell marker down 1 cell
3 col-disp @ 0=
\ cell rark at l e f t of display ? row-disp @ 14 =
\ are we a t bottor of display ?
4 if cur-col @ 0 0
! i f so i s at a t f i r s t colurn 1 if cur-row e 15 + row-nax 0 \ if so are we on last row
?
5
if -1 cur-col +!
\ move display colunn l e f t once
if 1 cur-row +!
\ if not rove down one cell
4
dis-col-change
\ scroll display l e f t
\ scroll downward
di s-row-change
7
then
if a t f i r s t column ignor
then
\ if at last row ignor
8 else
\ cell rark not at l e f t colurn
else
\ if not at bottor oi display
9
erase-cel 1-aarker
\ erase current mark
erase-cel i-marker
\ erase cell rark
0
-1 col-disp + I
\ rove l e f t without scroll
1 row-disp + !
\ rove down one cell
1 then
\ of display
then
2 place-cell-rarker ;
\ draw new cell marker
place-re1 1-marker ;
\ draw new cell earker
3
4
5
VolumeVII, No. 2
33
FORTH Dimensions