forked from erithmetic/sc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sc.doc
3833 lines (3825 loc) · 100 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: 7.13 $
.\"
.TH PNAME 1 "4 August 2001" "PNAME #REVISION#"
.SH NAME
pname \- spreadsheet calculator
.SH SYNOPSIS
.B pname
.RB [ -c ]
.RB [ -e ]
.RB [ -m ]
.RB [ -n ]
.RB [ -o ]
.RB [ -q ]
.RB [ -r ]
.RB [ -v ]
.RB [ -x ]
.RB [ -C ]
.RB [ -R ]
.RB [ -P
.IR range [ /address ]
|
.IR /address ]
.RI [ file... ]
.\" ==========
.SH DESCRIPTION
The spreadsheet calculator
.I pname
is based on rectangular tables much like a financial spreadsheet.
When invoked, it first looks for a file in the user's home
directory called .scrc and if found, reads that file into memory.
If that file contains the command
.RI `` set\ scrc '',
.I pname
looks for a file called .scrc in the current directory,
and if found, reads that file into memory, too.
Next, it reads the options from the command line, and
finally, it reads in the file or files specified on
the command line and presents the data in a table
organized as rows and columns of cells.
If invoked without a
.I file
argument, the table is initially empty, unless it is
running in a pipeline, in which case it will read
its data from the standard input.
If more than one file is specified,
all files except the first one will be merged.
The default filename for saving a file with the
.I Put
command will be the same as the first file specified,
and the other files will be treated as macros.
If you want to use advanced macros from the command
line, the ``|'' must be quoted to prevent it from being
interpreted by the shell.
.LP
Options begin with -.
However, an argument of a single - will be
interpreted to mean that spreadsheet data
will be taken from the standard input.
This is useful for including
.I pname
in a pipeline if the system supports pipes.
However, if standard input is not a terminal,
the - is only necessary if there are multiple
files and standard input is not the last to be
read, since standard input is automatically
read in after all other files in such cases
if it is not specified explicitly, or if there
are no other filenames on the command line.
If
.I pname
is included in a pipeline, and a filename of ``-''
is not specified, the standard input will be merged
in after all of the other named files have been
processed.
.LP
The first argument not beginning with a -,
or a single - by itself, and any subsequent
arguments will all be interpreted as
filenames (a filename of - meaning
standard input as noted above).
In addition, an argument of -- may
be used to signify that all subsequent
arguments should be treated as filenames
even if they begin with a -, but unlike -,
-- won't be treated as a filename itself.
.LP
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.
.LP
For an online tutorial, type the command:
.IP
pname #LIBDIR#/tutorial.pname
.LP
To print a quick reference card, type the command:
.IP
pnameqref | [your_printer_commmand]
.\" ----------
.SH OPTIONS
.\" ----------
.TP
.B \-c
Start the program with the recalculation being done in column order.
.\" ----------
.TP
.B \-e
Start the program with round-to-even (banker's rounding) enabled.
.\" ----------
.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 \-o
Start the program with automatic optimization of expressions enabled.
.\" ----------
.TP
.B \-q
Quit after loading all files, but before becoming interactive.
This is useful in shell scripts for getting information from
a file, for example, or using
.I pname
as a non-interactive calculator using the eval command.
.\" ----------
.TP
.B \-r
Start the program with the recalculation being done in row
order (default option).
.\" ----------
.TP
.B \-v
When piping data out using the
.I -P
option (below), change all expressions to values.
The
.I -v
option must precede the
.I -P
option to have an effect.
If the
.I -P option is used more than once,
there must be a separate
.I -v
option for each instance of the
.I -P
option.
.\" ----------
.TP
.B \-x
Cause the
.I Get
and
.I Put
commands (see below) to encrypt and decrypt data files.
.\" ----------
.TP
.B \-C
Start the program with automatic newline action set to increment the column
(see below).
.\" ----------
.TP
.BI \-P " range[/address]"
.PD 0
.TP
.BI \-P " /address"
.PD
Pipe a range to standard output.
The output is similar to that of the
.I Put
command (below), except that only cell data and
formatting information for cells in the range are
output, without all of the colors, range definitions,
column formatting, etc.
The optional
.I /address
is used to adjust all addresses
in the range to a new starting point.
This is useful for copying data from one file to
another, especially when used in conjunction with the
.I -v
option (above), using something like
.I "merge ""|sc -v -Prange/address filename"""
(note the pipe symbol).
This option may be used more than once to specify multiple ranges.
Note, however, that the
.I -v
option must precede the
.I -P
option on the command line,
and there must be a separate
.I -v
option for each instance of the
.I -P
option.
Any instance of
.I -P
not preceded by its own
.I -v
option will output unevaluated expressions.
If the range is left out, as shown in the
second form above,
.I pname
will be started interactively in navigate mode,
allowing you to navigate the spreadsheet and
highlight the range you want to output.
Pressing ESC, ^G, or q will terminate without
outputting any data.
.\" ----------
.TP
.B \-R
Start the program with automatic newline action set to increment the row
(see below).
.\" ----------
.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 "Personal Initialization File"
.\" ----------
When
.I pname
first starts, it looks for a file in the user's home
directory called .scrc and if found, loads it into memory.
The format of this file is the same as any other
.I pname
file, but should be reserved for setting certain defaults.
Any options set which have equivalent command line options may
be overridden by the command line.
If that file contains the command
.RI `` set\ scrc '',
.I pname
will then look for a file called .scrc in the current directory,
and if found, load that file into memory, too (this is analogous
to the ``set exrc'' command used by vi/ex).
Several commands exist specifically for setting default file
name extensions in the .scrc file, although they may also
be used from macros, ordinary spreadsheet files, or from within
.I pname
at the command line.
They will not, however, be saved along with the file.
The extensions should be quoted, and should not include
the preceding `.' (e.g.,
.I scext\ "sc"
will add the extension
.I .sc
).
These commands are:
.\" ----------
.TP
.B scext
This is the default extension for normal
.I pname
files (those created with the
.I Put
command).
If this command is not used, all
.I pname
files will be saved without an extension,
and any existing extension will not be removed.
Setting this option causes all
.I pname
files to be saved with the specified extension added,
unless it is already present.
If the file name already has an extension of
.I .sc,
it will first be removed.
Any other extension will not be removed.
.\" ----------
.TP
.B ascext
This is the default extension for plain text files
created with the
.I Write
command.
The file name will first be checked to see if it
already has an extension of either
.I .sc
or the extension specified with
.I scext
above, and if either one exists, it will first
be removed before adding the new extension.
If this option is not set,
a default of
.I .asc
will be used.
.\" ----------
.TP
.B tbl0ext
This is the default extension for files
created with the
.I Tbl
command if tblstyle is set to 0 (default).
The file name will first be checked to see if it
already has an extension of either
.I .sc
or the extension specified with
.I scext
above, and if either one exists, it will first
be removed before adding the new extension.
If this option is not set,
a default of
.I .cln
will be used.
.\" ----------
.TP
.B tblext
This is the default extension for files
created with the
.I Tbl
command if tblstyle is set to tbl.
The file name will first be checked to see if it
already has an extension of either
.I .sc
or the extension specified with
.I scext
above, and if either one exists, it will first
be removed before adding the new extension.
If this option is not set,
a default of
.I .tbl
will be used.
.\" ----------
.TP
.B latexext
This is the default extension for files
created with the
.I Tbl
command if tblstyle is set to latex.
The file name will first be checked to see if it
already has an extension of either
.I .sc
or the extension specified with
.I scext
above, and if either one exists, it will first
be removed before adding the new extension.
If this option is not set,
a default of
.I .lat
will be used.
.\" ----------
.TP
.B slatexext
This is the default extension for files
created with the
.I Tbl
command if tblstyle is set to slatex.
The file name will first be checked to see if it
already has an extension of either
.I .sc
or the extension specified with
.I scext
above, and if either one exists, it will first
be removed before adding the new extension.
If this option is not set,
a default of
.I .stx
will be used.
.\" ----------
.TP
.B texext
This is the default extension for files
created with the
.I Tbl
command if tblstyle is set to tex.
The file name will first be checked to see if it
already has an extension of either
.I .sc
or the extension specified with
.I scext
above, and if either one exists, it will first
be removed before adding the new extension.
If this option is not set,
a default of
.I .tex
will be used.
.\" ==========
.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 either a highlighted cell
or 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.
.\" ==========
.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 o
Automatic optimization of expressions.
If this is enabled, expressions which evaluate to
a constant are automatically optimized upon entry.
For example, if you enter @pow(2,32) into a cell,
the value 4294967296 will be stored in that cell,
whereas if optimization is turned off, the calculated
value will be displayed, but the actual expression will
be stored in the cell instead.
This allows you to edit the expression instead of
re-entering it from scratch when you just want to
make a minor change.
Default is automatic optimization off.
.\" ----------
.TP
.B i
Automatic insertion of rows/columns.
If this is enabled and craction is set to move the
cell cursor either down or to the right after entering
data into a cell, and the last cell in a row/column
in the scrolling portion of a framed range was just
filled, causing the cell cursor to move outside of this
range, a new column/row will be inserted, thus enlarging
the range and allowing you to continue entering data
into the row/column without overwriting the frame (which
may contain expressions of some sort, such as totals).
Default is no automatic insertion.
.\" ----------
.TP
.B c
Current cell highlighting.
If enabled, the current cell is highlighted
(using the terminal's standout mode, if available)
and the cell pointer ``<'' is turned off.
This is enabled by default.
.\" ----------
.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 l
Autolabeling.
If enabled, using the define command (/d) causes
a label to be automatically generated in the cell
to the left of the defined cell.
This is only done if the cell to the left is empty.
Default is enabled.
.\" ----------
.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 .
The cursor controls
.RI ( ^P or ^N )
in this mode will end a numeric entry.
.\" ----------
.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 centered string, ``<'' for a
leftstring or ``>'' for a rightstring (see below),
followed by "\fIstring\fP" for a constant string or
.RI { expr }
for a string expression.
A constant string may be preceeded with a backslash (`\\').
In this case the constant string will be used as a ``wheel''
to fill a column, e.g. "\\-" for a line in a column,
and "\\Yeh\ " for "Yeh\ Yeh\ Ye".
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.
.\" ----------
.TP
.B r
Newline action.
This is a 3-way toggle which determines which direction to
move after pressing the RETURN key to enter data into a cell.
It has the same effect as using the
.I set
(S) command to set the value of craction.
After selecting this option, you will be prompted for
the direction you want to move.
Valid directions are down (craction=1) and to the right (craction=2).
Pressing j, ^N, or the cursor-down key will cause
the cursor to move down a cell each time you press
the RETURN key and pressing l, the cursor-right key, or the
space bar will cause the cursor to move one cell to the right.
Pressing the RETURN key at the prompt selects no action
(craction=0, meaning the cursor stays in the current cell).
No action is the default unless
.I pname
is started with either the -R or -C option.
This option is ignored if the cell into which data is
being entered is not the current cell.
.\" ----------
.TP
.B s
Enable/disable color slop.
If a cell's label string is wider than the column width,
it will slop over into the next cell to the right if that
cell is empty.
However, if that cell is in a different color range than
the first, this slopover will be disabled, regardless of
whether the colors assigned to the two ranges are different
or not.
If cslop is enabled, strings may slop over even if the
next cell is in a different color range, carrying their
color with them, which may cause a ragged boundary between
the ranges, but may allow the strings to be seen in their
entirety.
Cslop is disabled by default.
.\" ----------
.TP
.B z
Set newline action limits.
This option sets limits to the newline action option above.
When this option is invoked, the row and column of the
current cell are remembered.
If a later newline action would take the current cell to the right of
the remembered column, then the current cell is instead moved to the
first column of the next row.
If a newline action would take the current cell below the remembered row,
then the current cell is instead moved to the top row of the next column.
.\" ----------
.TP
.B C
Color.
This option enables color, and must be set before any
other color options, such as colorneg (color negative
numbers) or colorerr (color cells with errors) will
have an effect.
On a slow connection, turning off color can noticeably
speed up screen updates.
.\" ----------
.TP
.B N
Color negative numbers.
When this option is set, all cells containing negative
numbers will have their color number increased by one.
Cells with color 8 will cycle back to color 1.
Color must be enabled for this option to take effect.
.\" ----------
.TP
.B E
Color cells with errors.
Setting this option will cause all cells with expressions
which evaluate to ERROR or INVALID to be set to color 3.
Color must be enabled for this option to take effect.
.PP
The quick numeric entry, newline action and set
newline action limits options can be combined to
allow very quick entry of large amounts of data.
If all the data to be entered is in a single row
or column then setting the quick numeric entry and
the appropriate newline action will allow the
numbers to be entered without any explicit commands
to position the current cell or enter a number.
.PP
If the data entry involves several entries in each row for many rows, then
setting the quick numeric entry option, setting the newline action to move
right after each entry and setting the newline action limits on the last
column on which data should be entered will allow the data to entered
quickly.
If necessary, columns which do not need data to be
entered can be hidden with the
.B z
command.
Similar arrangements can be made for entering several rows of data
in each column.
.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;
.B slatex
to give a
.I SLaTeX (Scandinavian LaTeX)
tabular environment;
.B tex
to give a
.I TeX
simple tabbed alignment with ampersands as delimiters; and
.B frame
to give a tblstyle output for FrameMaker.
.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 autoinsert / !autoinsert
Set/clear automatic insertion mode.
.\" ----------
.TP
.BR optimize / !optimize
Set/clear auto optimize 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.
.\" ----------
.TP
.BR rndtoeven / !rndtoeven
Default: *.5 will be rounded up to the next integer;
doing a 'set rndtoeven' will cause it to be rounded to
the closest even number instead (aka banker's rounding).
Round-to-even has advantages over the default rounding
for some applications.
For example, if X+Y is an integer,
then X+Y = rnd(X)+rnd(Y) with round-to-even,
but not always with the defaulting rounding method.
This could be an advantage, for example, when trying to
split an odd amount of money evenly between two people (it
would determine who gets the extra penny).
Note: rndtoeven only effects the @rnd and @round functions.
It has no effect on how a number is rounded to fit the
display format of a cell.
.\" ----------
.TP
.BI craction =n
Set the newline action.
.I n
can be:
.B 0
(default) to give no action;
.B 1
to move down after each entry; or
.B 2
to move right after each entry.
.TP
.BI rowlimit =n
Set the remembered limit for the maximum row below which
the current cell will be moved to the top of the next column
if the newline action is set to move the current cell down.
.I n
can be
.B -1
(default) to disable this facility.
.\" ----------
.TP
.BI pagesize =n
Set the page size for the PageUp, PageDown, J, and K commands.
If set to 0, the default is to move up or down
half the number of rows displayed on the screen,
or if the current cell is in a framed range,
half the number of rows in the scrolling region
of that range.
.\" ----------
.TP
.BI collimit =n
Set the remembered limit for the maximum column to the right of which
the current cell will be moved to the left of the next row
if the newline action is set to move the current cell right.
.I n
can be
.B -1
(default) to disable this facility.
.\" ----------
.TP
.BI color
Enable color.
This option must be set for any other color options,
such as colorneg or colorerr, to take effect.
On a slow connection, turning off color can noticeably
speed up screen updates.
.\" ----------
.TP
.BI colorneg
Color negative numbers.
When this option is set, all cells containing negative
numbers will have their color number increased by one.
Cells with color 8 will cycle back to color 1.
Color must be enabled for this option to take effect.
.\" ----------
.TP
.BI colorerr
Color cells with errors.
Setting this option will cause all cells with expressions
which evaluate to ERROR or INVALID to be set to color 3.
Color must be enabled for this option to take effect.
.\" ----------
.TP
.BI cslop
Enable color slop.
If a string that is wider than the cell that contains it,
it will slop over into the next cell to the right if that
cell is empty.
However, if that cell is in a different color range than
the first, this slop over will be disabled, regardless of
whether the colors assigned to the two ranges are different
or not.
If cslop is enabled, strings may slop over even if the
next cell is in a different color range, carrying their
color with them, which may cause a ragged boundary between
the ranges, but allows the strings to be seen in their
entirety.
.\" ----------
.TP
.BI scrc
This is intended for your $HOME/.scrc file.
It tells
.I pname
to also read the file .scrc in the current directory when starting.
Settings in this file will override those in $HOME/.scrc
but may be overridden by equivalent command line options,
if available.
Setting this could be a potential security risk, since starting
.I pname
with an unknown .scrc could potentially execute arbitrary commands.
This risk is probably very slight, since a spreadsheet program
is not likely to be run in just any directory, and should
.B NEVER
be run as root.
.RE
.\" ==========
.SS "Cursor Control Commands"
.\" ----------
\0 \" exactly one blank line (hard to get)
.PD 0
.TP
.B ^A
Go to cell A0 (same as HOME).
.PD
.\" ----------
.TP
.B ^P
Move the cell cursor up to the previous row.
.\" ----------
.TP
.B ^N
Move the cell cursor down to the next row.
.\" ----------
.TP
.B ^H
Move the cell cursor backward one column.
.\" ----------
.TP
.B SPACE
Move the cell cursor forward one column.
.\" ----------
.TP
.B "h, j, k, l"
These are alternate,
.IR vi -compatible
cell cursor controls (left, down, up, right).
Space is just like l (right).
.TP
.B "H, J, K, L"
These move the cursor
by half pages (left, down, up, right).
If
.I pagesize
is nonzero, up/down paging will be by
.I pagesize
rows, instead.
.\" ----------
.TP
.B "^F, ^B"
Same as J and K above.
.\" ----------
.TP
.B PAGE-DOWN PAGE-UP
Same as J and K above.
.\" ----------
.TP
.B TAB
If the character cursor is on the top line,
.SM TAB
tries to complete a range name if the character
immediately preceding it is alphanumeric or ``_'',
and starts a range if not (see below).
Otherwise, move the cell cursor forward one column.
.\" ----------
.TP
.B HOME
Go to cell A0.
.\" ----------
.TP
.B END
Same as ^E (see below).
.\" ----------
.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.