-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsc.doc
1810 lines (1809 loc) · 44.2 KB
/
sc.doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" Warning: The string "pname" is converted to the true program name
.\" by the makefile, throughout this document.
.\"
.\" Warning: The order of presentation of commands largely matches the
.\" help screen built into the program.
.\"
.\" Conventions:
.\" - pname italicized and never uppercased (it's a proper name).
.\" - Refer to lists of commands in the same order as introduced.
.\" - Command and function names bold when introduced, italicized in all
.\" other places if possible, or in `` '' if not.
.\" - Cell names italicized except when used in expressions; row numbers
.\" and column names not italicized.
.\" - Use `` '' rather than " " except referring to literal input or output.
.\" - TPs use default indent except for function names, then 18.
.\" - Smallify uppercase strings.
.\" - Avoid passive voice and third person.
.\" $Revision: 6.8 $
.\"
.TH PNAME 1
.SH NAME
pname \- spreadsheet calculator
.SH SYNOPSIS
.B pname
[
.B -c
]
[
.B -m
]
[
.B -n
]
[
.B -r
]
[
.B -x
]
[
.I file
]
.\" ==========
.SH DESCRIPTION
The spreadsheet calculator
.I pname
is based on rectangular tables much like a financial spreadsheet.
When invoked it presents you with a table
organized as rows and columns of cells.
If invoked without a
.I file
argument, the table is initially empty.
Otherwise
.I file
is read in (see the
.I Get
command below).
Each cell may have associated with it
a numeric value,
a label string,
and/or an expression (formula)
which evaluates to a numeric value or label string,
often based on other cell values.
.\" ----------
.PP
Options are:
.\" ----------
.TP
.B \-c
Start the program with the recalculation being done in column order.
.\" ----------
.TP
.B \-m
Start the program with automatic recalculation disabled.
The spreadsheet will be recalculated only when the ``@'' command is used.
.\" ----------
.TP
.B \-n
Start the program in quick numeric entry mode (see below).
.\" ----------
.TP
.B \-r
Start the program with the recalculation being done in row
order (default option).
.\" ----------
.TP
.B \-x
Cause the
.I Get
and
.I Put
commands (see below) to encrypt and decrypt data files.
.\" ----------
.PP
All of these options can be changed with the
.I ^T
and
.I S
commands (see below) while
.I pname
is running. Options specified when
.I pname
is invoked
override options saved in the data file.
.\" ==========
.SS "General Information"
.\" ----------
The screen is divided into four regions.
The top line is for entering commands and displaying cell values.
The second line is for messages from
.IR pname .
The third line and the first four columns show the column and row numbers,
from which are derived cell addresses, e.g.
.I A0
for the cell in column A, row 0.
Note that column names are case-insensitive: you can enter
.I A0
or
.IR a0 .
.\" ----------
.PP
The rest of the screen forms a window looking at a portion of the table.
The total number of display rows and columns available,
hence the number of table rows and columns displayed,
is set by
.IR curses (3)
and may be overridden by setting the
.SM LINES
and
.SM COLUMNS
environment variables, respectively.
.\" ----------
.PP
The screen has two cursors:
a cell cursor, indicated by a highlighted cell and a ``<'' on the screen,
and a character cursor, indicated by the terminal's hardware cursor.
The cell and character cursors are often the same.
They differ when you type a command on the top line.
.\" ----------
.PP
If a cell's numeric value is wider than the column width (see the
.I f
command), the cell is filled with asterisks.
If a cell's label string is wider than the column width,
it is truncated at the start of the next non-blank cell in the row, if any.
.\" ----------
.PP
Cursor control commands and row and column commands
can be prefixed by a numeric argument
which indicates how many times the command is to be executed.
You can type
.I ^U
before a repeat count if quick numeric entry mode is enabled
or if the number is to be entered
while the character cursor is on the top line.
.\" ----------
.PP
Commands which use the terminal's control key, such as
.IR ^N ,
work both when a command is being typed and when in normal mode.
.\" ==========
.SS "Changing Options"
.\" ----------
\0 \" exactly one blank line (hard to get)
.PD 0
.TP
.BI ^T o
Toggle options.
This command allows you to switch the state of one option selected by
.IR o .
A small menu lists the choices for
.I o
when you type
.IR ^T .
The options selected are saved when the data and formulas are saved
so that you will have the same setup next time you enter the
spreadsheet.
.PD
.RS
.\" ----------
.TP
.B a
Automatic Recalculation.
When set, each change in the spreadsheet causes the entire spreadsheet
be recalculated. Normally this is not noticeable, but for very large
spreadsheets, it may be faster to clear automatic recalculation mode and
update the spreadsheet via explicit ``@'' commands. Default is
automatic recalculation on.
.\" ----------
.TP
.B c
Current cell highlighting.
If enabled, the current cell is highlighted
(using the terminal's standout mode, if available)
in addition to being marked by the cell cursor.
.\" ----------
.TP
.B e
External function execution.
When disabled, external functions (see
.IR @ext ()
below) are not called.
This saves a lot of time at each screen update.
External functions are disabled by default.
If disabled, and external functions are used anywhere,
a warning is printed each time the screen is updated,
and the result of
.IR @ext ()
is the value from the previous call, if any, or a null string.
.\" ----------
.TP
.B n
Quick numeric entry.
If enabled,
a typed digit is assumed to be
the start of a numeric value for the current cell,
not a repeat count, unless preceded by
.IR ^U .
.\" ----------
.TP
.B t
Top line display.
If enabled,
the name and value of the current cell is displayed on the top line.
If there is an associated label string,
the first character of the string value
is ``<'' for a leftstring or ``>'' for a rightstring (see below),
followed by "\fIstring\fP" for a constant string
or
.RI { expr }
for a string expression.
If the cell has a numeric value,
it follows as
.RI [ value ],
which may be a constant or expression.
.\" ----------
.TP
.B x
Encryption.
See the
.B \-x
option.
.\" ----------
.TP
.B $
Dollar prescale.
If enabled, all numeric
.B constants
(not expressions) which you enter are multipled by 0.01
so you don't have to keep typing the decimal point
if you enter lots of dollar figures.
.RE
.\" ----------
\0 \" exactly one blank line (hard to get)
.PD 0
.TP
.B S
Set options. This command allows you to set various options.
A small menu lists the options that cannot be changed through
.I ^T
above.
.PD
.RS
.TP
.BR byrows / bycols
Specify the order cell evaluation when updating. These options also affect
the order in which cells are filled (see
.IR /f )
and whether a row or column is cleared by an
.I x
command.
.TP
.BI iterations =n
Set the maximum number of recalculations before
the screen is displayed again.
.I Iterations
is set to 10 by default.
.TP
.BI tblstyle =s
Control the output of the
.I T
command.
.I s
can be:
.B 0
(default) to give colon delimited fields, with no
.I tbl
control lines;
.B tbl
to give colon delimited fields, with
.IR tbl (1)
control lines;
.B latex
to give a
.I LaTeX
tabular environment; and
.B tex
to give a
.I TeX
simple tabbed alignment with ampersands as delimiters.
.PP
Other
.I Set
options are normally used only in
.I pname
data files since they are available through
.IR ^T .
You can also use them interactively
.TP
.BR autocalc / !autocalc
Set/clear auto recalculation mode.
.TP
.BR numeric / !numeric
Set/clear numeric mode.
.TP
.BR prescale / !prescale
Set/clear numeric prescale mode.
.TP
.BR extfun / !extfun
Enable/disable external functions.
.TP
.BR cellcur / !cellcur
Set/clear current cell highlighting mode.
.TP
.BR toprow / !toprow
Set/clear top row display mode.
.RE
.\" ==========
.SS "Cursor Control Commands"
.\" ----------
\0 \" exactly one blank line (hard to get)
.PD 0
.TP
.B ^P
Move the cell cursor up to the previous row.
.PD
.\" ----------
.TP
.B ^N
Move the cell cursor down to the next row.
.\" ----------
.TP
.B ^B
Move the cell cursor backward one column.
.\" ----------
.TP
.B ^F
Move the cell cursor forward one column.
.\" ----------
.TP
.B "h, j, k, l"
If the character cursor is not on the top line, these are alternate,
.IR vi -compatible
cell cursor controls (left, down, up, right).
.\" ----------
.TP
.B ^H
If the character cursor is not on the top line,
.I ^H
is the same as
.IR ^B .
.\" ----------
.TP
.B SPACE
If the character cursor is not on the top line,
the space bar is the same as
.IR ^F .
.\" ----------
.TP
.B TAB
If the character cursor is on the top line,
.SM TAB
starts a range (see below).
Otherwise, it is the same as
.IR ^F .
.\" ----------
.TP
.B "Arrow Keys"
The terminal's arrow keys provide another alternate set of cell cursor controls
if they exist and are supported in the appropriate
.I termcap
entry.
Some terminals have arrow keys which conflict with other control key codes.
For example, a terminal might send
.I ^H
when the back arrow key is pressed.
In these cases, the conflicting arrow key performs the same function
as the key combination it mimics.
.\" ----------
.TP
.B ^
Move the cell cursor up to row 0 of the current column.
.\" ----------
.TP
.B #
Move the cell cursor down to the last valid row of the current column.
.\" ----------
.TP
.B 0
Move the cell cursor backward to column A of the current row.
This command must be prefixed with
.I ^U
if quick numeric entry mode is enabled.
.\" ----------
.TP
.B $
Move the cell cursor forward to the last valid column of the current row.
.\" ----------
.TP
.B b
Scan the cursor backward (left and up) to the previous valid cell.
.\" ----------
.TP
.B w
Scan the cursor forward (right and down) to the next valid cell.
.\" ----------
.TP
.BI ^E d
Go to end of range.
Follow
.I ^E
by a direction indicator such as
.I ^P
or
.IR j .
If the cell cursor starts on a non-blank cell,
it goes in the indicated direction until the last non-blank adjacent cell.
If the cell cursor starts on a blank cell,
it goes in the indicated direction until the first non-blank cell.
This command is useful when specifying ranges of adjacent cells (see below),
especially when the range is bigger than the visible window.
.\" ----------
.TP
.B g
Go to a cell.
.I pname
prompts for a cell's name, a regular expression surrounded by
quotes, or a number.
If a cell's name such as
.I ae122
or a the name of a defined range is given, the cell cursor goes
directly to that cell.
If a quoted regular expression such as "
.I Tax Table
" or "
.I ^Jan [0-9]*$
" is given,
.I pname
searches for a cell containing a string matching the regular
expression.
See
.I regex(3)
or
.I ed(1)
for more details on the form of regular
expressions.
If a number is given,
.I pname
will search for a cell containing that number.
Searches for either strings or numbers proceed forward from the
current cell, wrapping back to a0 at the end of the table, and
terminate at the current cell if the string or number is not found.
The last
.I g
command is saved, and can be re-issued by entering
.IR g<return> .
.\" ==========
.SS "Cell Entry and Editing Commands"
.\" ----------
Cells can contain both a numeric value and a string value.
Either value can be the result of an expression,
but not both at once,
i.e. each cell can have only one expression associated with it.
Entering a valid numeric expression
alters the cell's previous numeric value, if any,
and replaces the cell's previous string expression, if any,
leaving only the previously computed constant label string.
Likewise, entering a valid string expression
alters the cell's the previous label string, if any,
and replaces the cell's previous numeric expression, if any,
leaving only the previously computed constant numeric value.
.TP
.B =
Enter a numeric constant or expression into the current cell.
.I pname
prompts for the expression on the top line.
The usual way to enter a number into a cell is to type ``='',
then enter the number in response to the prompt on the top line.
The quick numeric entry option, enabled through the
.B \-n
option or
.I ^T
command, shows the prompt when you enter the first digit of a number
(you can skip typing ``='').
.\" ----------
.TP
.B <
Enter a label string into the current cell
to be flushed left against the left edge of the cell.
.\" ----------
.IP \fB"\fP
.PD 0
.TP
.B >
Enter a label string into the current cell
to be flushed right against the right edge of the cell.
.PD
.\" ----------
.PP
Strings you enter must start with ".
You can leave off the trailing " and
.I pname
will add it for you.
You can also enter a string expression
by backspacing over the opening " in the prompt.
.\" ----------
.TP
.B e
Edit the value associated with the current cell.
This is identical to ``=''
except that the command line starts out containing
the old numeric value or expression associated with the cell.
.\" ----------
.TP
.B E
Edit the string associated with the current cell.
This is identical to ``<'', ``"'', or ``>''
except that the command line starts out containing
the old string value or expression associated with the cell.
.\" ----------
.PP
To enter and edit a cell's number part, use the ``='' and
.I e
commands.
To enter and edit a cell's string part, use the ``<'', ``"'', ``>'', and
.I E
commands.
See the sections below on numeric and string expressions for more information.
.\" ----------
.TP
.B x
Clear the current cell.
Deletes the numeric value, label string, and/or numeric or string expression.
You can prefix this command with a count
of the number of cells on the current row to clear. The current column is
used if column recalculation order is set.
Cells cleared with this command may be recalled
with any of the
.I pull
commands (see below).
.\" ----------
.TP
.B m
Mark a cell to be used as the source for the
.I copy
command.
.\" ----------
.TP
.B c
Copy the last marked cell to the current cell,
updating row and column references in its numeric or string expression, if any.
.\" ----------
.TP
.B +
If not in numeric mode, add the current numeric argument (default 1)
to the value of the current cell. In numeric mode, ``+'' introduces a new
numeric expression or value, the same as ``=''.
.\" ----------
.TP
.B -
If not in numeric mode, subtract the current numeric argument (default 1)
from the value of the current cell. In numeric mode, ``-'' introduces a new,
negative, numeric expression or value, like ``=''.
.\" ==========
.SS "File Commands"
.\" ----------
\0 \" exactly one blank line (hard to get)
.PD 0
.TP
.B G
Get a new database from a file.
If encryption is enabled,
the file is decrypted before it is loaded into the spreadsheet.
.PD
.\" ----------
.TP
.B P
Put the current database into a file.
If encryption is enabled,
the file is encrypted before it is saved.
.\" ----------
.TP
.B W
Write a listing of the current database into a file
in a form that matches its appearance on the screen.
This differs from the
.I Put
command in that its files are intended to be reloaded with
.IR Get ,
while
.I Write
produces a file for people to look at. Hidden rows or columns
are not shown when the data is printed.
.\" ----------
.TP
.B T
Write a listing of the current database to a file,
but include delimiters suitable for processing by the
.IR tbl ,
.IR LaTeX ,
or
.I TeX
table processors.
The delimiters are controlled by the
.I tblstyle
option. See
.I Set
above.
The delimters are are a colon\ (:) for style
.IR 0 or tbl
and an ampersand\ (&) for style
.IR latex or tex .
.\" ----------
.PP
With the
.IR Put ,
.IR Write ,
and
.I Table
commands, the optional range argument writes a subset of the spreadsheet to
the output file.
.\" ----------
.PP
With the
.I Write
and
.I Table
commands, if you try to write to the last file used with the
.I Get
or
.I Put
commands, or the file specified on the command line when
.I pname
was invoked, you are asked to confirm
that the (potentially) dangerous operation is really what you want.
.\" ----------
.PP
The three output commands,
.IR Put ,
.IR Write ,
and
.IR Table ,
can pipe their (unencrypted only) output to a program.
To use this feature,
enter ``| program'' to the prompt asking for a filename.
For example, to redirect the output of the
.I Write
command to the printer,
you might enter ``| lpr -p''.
.\" ----------
.TP
.B M
Merge the database from the named file into the current database.
Values and expressions defined in the named file
are read into the current spreadsheet
overwriting the existing entries at matching cell locations.
.\" ----------
.TP
.B R
Run macros.
Since
.I pname
files are saved as ASCII files,
it is possible to use them as primitive macro definition files.
The
.I Run
command makes this easier.
It's like the
.I Merge
command,
but prints a saved path name as the start of the filename to merge in.
The string to use is set with the
.I Define
command.
To write macros, you must be familiar with the file format written by the
.I Put
command.
This facility is still primitive and could be much improved.
.\" ----------
.TP
.B D
Define a path for the
.I Run
command to use.
.\" ----------
.PP
All file operations take a filename as the first argument
to the prompt on the top line.
The prompt supplies a " to aid in typing in the filename.
The filename can also be obtained from a cell's label string
or string expression.
In this case, delete the leading " with the backspace key
and enter a cell name such as
.I a22
instead.
If the resulting string starts with ``|'',
the rest of the string is interpreted as a
.SM UNIX
command, as above.
.\" ==========
.SS "Row and Column Commands"
.\" ----------
These commands can be used on either rows or columns.
The second letter of the command is either a row designator
(one of the characters
.IR r ,
.IR ^B ,
.IR ^F ,
.IR h ,
.IR l )
or a column designator (one of
.IR c ,
.IR ^P ,
.IR ^N ,
.IR k ,
.IR j ).
A small menu lists the choices for the second letter
when you type the first letter of one of these commands.
Commands which move or copy cells
also modify the row and column references in affected cell expressions.
The references may be frozen by using the
.I fixed
operator or using the
.I $
character in the reference to the cell (see below).
.\" ----------
.TP
.B "ir, ic"
Insert a new row (column)
by moving the row (column) containing the cell cursor,
and all following rows (columns), down (right) one row (column).
The new row (column) is empty.
.\" ----------
.TP
.B "ar, ac"
Append a new row (column) immediately following the current row (column).
It is initialized as a copy of the current one.
.\" ----------
.TP
.B "dr, dc"
Delete the current row (column).
.\" ----------
.TP
.B "pr, pc, pm"
Pull deleted rows (columns) back into the spreadsheet.
The last deleted set of cells is put back into the spreadsheet
at the current location.
.I pr
inserts enough rows to hold the data.
.I pc
inserts enough columns to hold the data.
.I pm
(merge) does not insert rows or columns;
it overwrites the cells beginning at the current cell cursor location.
.\" ----------
.TP
.B "vr, vc"
Remove expressions from the affected rows (columns),
leaving only the values which were in the cells
before the command was executed.
.\" ----------
.TP
.B "zr, zc"
Hide (``zap'') the current row (column).
This keeps a row (column) from being displayed but keeps it in the data base.
The status of the rows and columns is saved with the data base so hidden
rows and columns will be still
be hidden when you reload the spreadsheet. Hidden rows or columns are not
printed by the
.I W
command.
.\" ----------
.TP
.B "sr, sc"
Show hidden rows (columns).
Enter a range of rows (columns) to be revealed.
The default is the first range of rows (columns) currently hidden.
This command ignores the repeat count, if any.
.\" ----------
.TP
.B f
Set the output format to be used
for printing the numeric values in each cell in the current column.
Enter two numbers:
the total width in characters of the column,
and the number of digits to follow decimal points.
Values are rounded off to the least significant digit displayed.
The total column width affects displays of strings as well as numbers.
A preceding count can be used to affect more than one column.
This command has only a column version (no second letter).
.\" ==========
.SS "Range Commands"
.\" ----------
Range operations affect a rectangular region on the screen
defined by the upper left and lower right cells in the region.
All of the commands in this class start with a slash;
the second letter of the command indicates which command.
A small menu lists the choices for the second letter when you type ``/''.
.I pname
prompts for needed parameters for each command.
Phrases surrounded by square brackets in the prompt are informational only
and may be erased with the backspace key.
.\" ----------
.PP
Prompts requesting variable names may be satisfied
with either an explicit variable name, such as
.IR A10 ,
or with a variable name previously defined in a
.I /d
command (see below).
Range name prompts require either an explicit range such as
.IR A10:B20 ,
or a range name previously defined with a
.I /d
command.
A default range shown in the second line
is used if you omit the range from the command or press the
.SM TAB
key (see below).
The default range can be changed by moving the cell cursor
via the control commands
.RI ( ^P ,
.IR ^N ,
.IR ^B ,
.IR ^F )
or the arrow keys.
The cells in the default range are highlighted
(using the terminal's standout mode, if available).
.\" ----------
.TP
.B /x
Clear a range.
Cells cleared with this command may be recalled with any of the
.I pull
commands.
.\" ----------
.TP
.B /v
Values only.
This command removes the expressions from a range of cells,
leaving just the values of the expressions.
.\" ----------
.TP
.B /c
Copy a source range to a destination range.
The source and destination may be different sizes.
The result is always one or more full copies of the source.
Copying a row to a row yields a row.
Copying a column to a column yields a column.
Copying a range to anything yields a range.
Copying a row to a column or a column to a row yields a range
with as many copies of the source as there are cells in the destination.
This command can be used to duplicate a cell through an arbitrary range
by making the source a single cell range such as
.IR b20:b20 .
.\" ----------
.TP
.B /f
Fill a range with constant values
starting with a given value and increasing by a given increment.
Each row is filled before moving on to the next row if row order
recalculation is set. Column order fills each column in the range
before moving on to the next column.
The start and increment numbers may be positive or negative.
To fill all cells with the same value, give an increment of zero.
.\" ----------
.TP
.B /d
Use this command to assign a symbolic name to a single cell
or a rectangular range of cells on the screen.
The parameters are the name, surrounded by "",
and either a single cell name such as
.I A10
or a range such as
.IR a1:b20 .
Names defined in this fashion are used by the program in future prompts,
may be entered in response to prompts requesting a cell or range name,
and are saved when the spreadsheet is saved with the
.I Put
command.
Names defined must be more than two alpha characters long
to differentiate them from a column names,
and must not have embedded special characters.
Names may include the character ``_'' or numerals
as long as they occur after the first three alpha characters.
.\" ----------
.TP
.B /s
This command lists (shows) the currently defined range names.
If there are no defined range names, then a message is given,
otherwise
it pipes output to
.IR sort ,
then to
.IR less .
If the environment variable PAGER is set, its value is used in place of
.IR less.
.\" ----------
.TP
.B /u
Use this command to undefine a previously defined range name.
.\" ==========
.SS "Miscellaneous Commands"
.\" ----------
\0 \" exactly one blank line (hard to get)
.PD 0
.TP
.B Q
.TP
.B q
.TP
.B ^C
Exit from
.IR pname .
If you made any changes since the last
.I Get
or
.IR Put ,
.I pname
asks about saving your data before exiting.
.PD
.\" ----------
.TP
.B ^G
.PD 0
.TP
.B ESC
Abort entry of the current command.
.PD
.\" ----------
.TP
.B ?
Enter an interactive help facility. Lets you look up brief
summaries of the main features of the program. The help facility is
structured like this manual page so it is easy to find more
information on a particular topic.
.\" ----------
.TP
.B !
Shell escape.
.I pname
prompts for a shell command to run.
End the command line with the
.SM RETURN
key.
If the environment variable
.SM SHELL
is defined, that shell is run.
If not, /bin/sh is used.
Giving a null command line starts the shell in interactive mode.
A second ``!'' repeats the previous command.
.\" ----------
.TP
.B ^L
Redraw the screen.
.\" ----------
.TP
.B ^R
Redraw the screen with special highlighting of cells to be filled in.
This is useful for finding values you need to provide or update
in a form with which you aren't familiar
or of which you have forgotten the details.
It's also useful for checking a form you are creating.
All cells which contain constant numeric values
(not the result of a numeric expression)
are highlighted temporarily,
until the next screen change, however minor.
To avoid ambiguity,
the current range (if any) and current cell are not highlighted.
.\" ----------
.TP
.B ^X
This command is similar to
.IR ^R ,
but highlights cells which have expressions.
It also displays the expressions in the highlighted cells
as left-flushed strings,
instead of the numeric values and/or label strings of those cells.
This command makes it easier to check expressions,
at least when they fit in their cells or the following cell(s) are blank
so the expressions can slop over (like label strings).
In the latter case, the slop over is not cleared on the next screen update,
so you may want to type
.I ^L
after the
.I ^X
in order to clean up the screen.
.\" ----------
.TP