-
Notifications
You must be signed in to change notification settings - Fork 20
/
sc.doc
4620 lines (4595 loc) · 125 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 \(lq \(rq if not.
.\" - Cell names italicized except when used in expressions; row numbers
.\" and column names not italicized.
.\" - Use \(lq \(rq rather than `` '' or " " 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.16 $
.\"
.TH PNAME 1 "April 14, 2016" "PNAME #REVISION#"
.SH NAME
pname \- spreadsheet calculator
.SH SYNOPSIS
.SY pname
.OP \-aCceMmnoqRrvx
.RB [ \-P
.IR range [/ address ]
|
.RI / address ]
.OP \-W range
.RI [ file
.IR .\|.\|. ]
.YS
.\" ==========
.SH DESCRIPTION
The spreadsheet calculator
.B 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
.RB \(lq set\ scrc \(rq,
.B 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
.B 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
.RB \(oq | \(cq
must be quoted to prevent it from being
expanded by the shell.
.LP
Options begin with
.RB \(oq \- \(cq.
However, an argument of a single
.RB \(oq \- \(cq
will be interpreted to mean that spreadsheet data
will be taken from the standard input.
This is useful for including
.B pname
in a pipeline if the system supports pipes.
However, if standard input is not a terminal, the
.RB \(oq \- \(cq
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
.B pname
is included in a pipeline, and a filename of
.RB \(oq \- \(cq
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
.RB \(oq \- \(cq,
or a single
.RB \(oq \- \(cq
by itself, and any subsequent
arguments will all be interpreted as
filenames (a filename of
.RB \(oq \- \(cq
meaning standard input as noted above).
In addition, an argument of
.RB \(lq \-\- \(rq
may be used to signify that all subsequent
arguments should be treated as filenames
even if they begin with a
.RB \(oq \- \(cq,
but unlike
.RB \(oq \- \(cq,
.RB \(lq \-\- \(rq
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 generate a quick reference card in PDF format, type the command
(for traditional
.BR troff ):
.IP
pnameqref | troff \-ms | dpost | ps2pdf \-
.IR filename .pdf
.LP
Or for using
.BR groff :
.IP
pnameqref | troff \-Tpdf \-ms | gropdf >
.IR filename .pdf
.\" ----------
.SH OPTIONS
.\" ----------
.TP
.B \-a
Do not run the autorun macro, if one is specified in the file.
.\" ----------
.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
.RB \(lq @ \(rq
command is used.
.\" ----------
.TP
.B \-n
Start the program in quick numeric entry mode
(\TQuickNumericEntryModesee below\T).
.\" ----------
.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
.B pname
as a non-interactive calculator using the
.B eval
command.
.\" ----------
.TP
.B \-r
Start the program with the recalculation being done in row
order (default option).
.\" ----------
.TP
.B \AFl-v\-v
When piping data out using the
.B \-P
option (below), change all expressions to values.
The
.B \-v
option must precede the
.B \-P
option to have an effect.
If the
.B \-P
option is used more than once, there must be a separate
.B \-v
option for each instance of the
.B \-P
option.
.\" ----------
.TP
.B \AFl-x\-x
Cause the
.B \TGetGet\T
and
.B \TPutPut\T
commands (see below) to encrypt and decrypt data files.
.\" ----------
.TP
.B \-C
Start the program with automatic newline action set to increment the column
(\TNewlineActionsee below\T).
.\" ----------
.TP
.B \-M
Process mouse events (see options
.BR \Tset_mousemouse / !mouse\T ).
This option overrides a
.RB \(lq "set !mouse" \(rq
command in
.BR .scrc .
It is used by
.BR xsc (1).
.TP
\fB\-P\fI range\fR[/\fIaddress\fR]
.PD 0
.TP
\fB\-P\fR /\fIaddress\fR
.PD
Pipe a range to standard output.
The output is similar to that of the
.B \TPutPut\T
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
.B \TFl-v\-v\T
option (above), using something like
.B "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
.B \-v
option must precede the
.B \-P
option on the command line,
and there must be a separate
.B \-v
option for each instance of the
.B \-P
option.
Any instance of
.B \-P
not preceded by its own
.B \-v
option will output unevaluated expressions.
A range of
.RB \(lq % \(rq
may be used to refer to the entire spreadsheet.
If the range is left out, as shown in the
second form above,
.B 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
(\TNewlineActionsee below\T).
.\" ----------
.TP
.B \-W
Pipe a range to standard output.
The output is identical to that of the
.B \TWriteWrite\T
command (below).
This option may be used more than once to specify multiple ranges.
A range of
.RB \(lq % \(rq
may be used to refer to the entire spreadsheet.
.\" ----------
.PP
All of these options can be changed with the
.B \TToggleOptions^T\T
and
.B \TSetOptionsS\T
commands (see below) while
.B pname
is running. Options specified when
.B pname
is invoked
override options saved in the data file.
.\" ==========
.SS "Personal Initialization File"
.\" ----------
When
.B 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
.B 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
.RB \(lq set\ scrc \(rq,
.B 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 \(lqset exrc\(rq command used by vi/ex).
These \(lqdotfiles\(rq may be created by any text editor.
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
.B 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 \(oq.\(cq (e.g.,
.B scext\ "sc"
will add the extension
.B .sc
).
These commands are:
.\" ----------
.TP
.B scext
This is the default extension for normal
.B pname
files (those created with the
.B Put
command).
If this command is not used, all
.B pname
files will be saved without an extension,
and any existing extension will not be removed.
Setting this option causes all
.B pname
files to be saved with the specified extension added,
unless it is already present.
If the file name already has an extension of
.B .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
.B Write
command.
The file name will first be checked to see if it
already has an extension of either
.B .sc
or the extension specified with
.B 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
.B .asc
will be used.
.\" ----------
.TP
.B tbl0ext
This is the default extension for files
created with the
.B 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
.B .sc
or the extension specified with
.B 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
.B .cln
will be used.
.\" ----------
.TP
.B tblext
This is the default extension for files
created with the
.B 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
.B .sc
or the extension specified with
.B 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
.B .tbl
will be used.
.\" ----------
.TP
.B latexext
This is the default extension for files
created with the
.B 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
.B .sc
or the extension specified with
.B 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
.B .lat
will be used.
.\" ----------
.TP
.B slatexext
This is the default extension for files
created with the
.B 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
.B .sc
or the extension specified with
.B 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
.B .stx
will be used.
.\" ----------
.TP
.B texext
This is the default extension for files
created with the
.B 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
.B .sc
or the extension specified with
.B 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
.B .tex
will be used.
.TP
.BI "histfile \(dq" filename \(dq
Set history filename or disable saving the history.
The default filename is
.RB \(lq ~/.sc_history \(rq.
If the filename begins with
.RB \(oq ~/ \(cq
the tilde is expanded with the contents of the environment variable
.BR $HOME .
If it begins with
.RB \(oq ~ \(cq
followed by a user name, this sequence is expanded with the home
directory of that user found in the password database.
The command
.RB \(lq "histfile \(dq\(dq" \(rq
(empty
.IR filename )
disables using a history 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
.BR pname .
The third line and the first four columns show the column and row numbers,
from which are derived cell addresses, e.g.
.B A0
for the cell in column A, row 0.
Note that column names are case-insensitive: you can enter
.B A0
or
.BR 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
.BR 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 \(lq<\(rq on the screen, and a character cursor,
indicated by the terminal's hardware cursor.
.\" ----------
.PP
If a cell's numeric value is wider than the column width (see the
.B \TFCmdf\T
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
.B ^U
before a repeat count if quick numeric entry mode is enabled.
.\" ==========
.SS "Changing Options"
.\" ----------
\0 \" exactly one blank line (hard to get)
.PD 0
.TP
.BI \AToggleOptions^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
.BR ^T .
Unless otherwise noted, 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 \(lq@\(rq commands.
Default is automatic recalculation on.
.\" ----------
.TP
.B b
Braille enhancement mode.
See the \Tbraillebraille section\T under the
.B Set
command below for a complete description of
how to use this mode.
This option is not saved when saving a file,
to allow blind and sighted users to easily
share files. It is intended for use in a user's
.B .scrc
file.
.\" ----------
.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 \(lq<\(rq is turned off.
This is enabled by default.
.\" ----------
.TP
.B e
External function execution.
When disabled, external functions (see
.BR \T@ext@ext ()\T
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
.BR @ext ()
is the value from the previous call, if any, or a null string.
.\" ----------
.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).
If autowrap is also enabled, it will take precedence,
and a new row/column will only be inserted after
entering data in the very last cell (bottom right corner)
of the scrolling range.
The default is no automatic insertion.
.\" ----------
.TP
.B w
Automatic wrap to next row/column.
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, the cell cursor will move to the first cell in
the next row/column in this range.
If this would also take the cursor out of the scrolling
portion of the range, the cursor will remain in last
edited cell instead, unless autoinsert is also enabled,
in which case a new row/column will be added so that
the cursor can wrap.
The default is no autowrap.
.\" ----------
.TP
.B l
Autolabeling.
If enabled, using the define command (rd) 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 \AQuickNumericEntryModen
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
.BR ^U .
Also, the \(oq+\(cq and \(oq\-\(cq keys will enter insert mode
and append a \(oq+\(cq or \(oq\-\(cq to the existing contents
of the cell, allowing the user to easily add to or
subtract from the current numeric contents of the cell.
The cursor controls
.RB ( ^P ,
.BR ^N ,
or any of the arrow keys)
in this mode will end a numeric entry if the entry
was started by pressing \(oq+\(cq, \(oq\-\(cq, or a digit.
Switching from insert mode to edit mode will cause the
cursor controls to revert to their normal functions.
.\" ----------
.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 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 \(lq|\(rq for a \TEnterCenterStringcentered string\T,
\(lq<\(rq for a
\TEnterLeftStringleftstring\T or \(lq>\(rq for a
\TEnterRightStringrightstring\T (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 (\(oq\\\(cq).
In this case the constant string will be used as a \(lqwheel\(rq
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 $
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
\ANewlineActionNewline 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
.B 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, which means that the cursor will remain in
the current cell).
No action is the default unless
.B 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 x
Encryption.
See the
.B \TFl-x\-x\T
option.
.\" ----------
.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 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.
.\" ----------
.TP
.B N
Color negative numbers.
When this option is set, all cells containing negative
numbers will have their color number incremented by one.
Cells with color 8 will cycle back to color 1.
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.
An alternative to setting newline action limits is to
enclose the range for entry in a frame (see
\(lq\TFramedRangesFramed Ranges\T\(rq
below), and setting the autowrap option.
Setting autoinsert will insert new rows as needed if the
frame includes data at the bottom.
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 \ASetOptionsS
Set options. This command allows you to set various options.
A small menu lists the options that cannot be changed through
.B ^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
.BR \TrfCmdrf\T )
and whether a row or column is cleared by an
.B 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
.B T
command.
.I s
can be:
.B 0
(default) to give colon delimited fields, with no
.B tbl
control lines;
.B tbl
to give colon delimited fields, with
.BR tbl (1)
control lines;
.B latex
to give a
.B LaTeX
tabular environment;
.B slatex
to give a
.B SLaTeX (Scandinavian LaTeX)
tabular environment;
.B tex
to give a
.B TeX
simple tabbed alignment with ampersands as delimiters; and
.B frame
to give a tblstyle output for FrameMaker.
.\" ----------
.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 displayed rows in the scrolling
region of that range.
.\" ----------
.PP
Other
.B Set
options are normally used only in
.B pname
data files since they are available through
.BR ^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 autowrap / !autowrap
Set/clear autowrap 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 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 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
.BR color / !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
.BR colorneg / !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
.BR colorerr / !colorerr
Color cells with errors.