System Variable FC

From NARS2000
Jump to navigationJump to search

⎕FC - Format Control

Z←⎕FC returns the current value of the Format Control vector.
Z is a character vector whose elements each control a separate aspect of how numeric output is formatted by the system.


⎕FC←R sets all of the values of the Format Control Vector to R.
⎕FC←⍬ sets all of the values of the Format Control vector to their system default state.
⎕FC[L]←R sets the value(s) of the Format Control vector indexed by L to R.


The first seven elements of ⎕FC control the raw output of numeric display as well as the monadic and dyadic forms of the Format function ().

Index Name Default
Value
[1] Decimal Point Separator '.'
[2] Thousands Separator ','
[3] Format-by-example '8' Fill '*'
[4] Format-by-example Overflow fill '0'
[5] Blank Fill (not ",.0123456789") '_'
[6] Negative Sign '¯'
[7] Complex Number Display Separator (only "iJdhru") 'J'

For example,

      f←{⎕FC[1⊃⍺]←2⊃⍺ ⋄ ⍕⍵}
      (1 6) ':-' f ¯23.2
-23:2
      (1 6 7) ':-d' f ¯23.2i0
23:2ad180:0
      7 'i' f ¯2i3
¯2i3
      7 'J' f ¯2i3
¯2J3
      7 'd' f ¯2i3
3.605551275ad123.7
      7 'h' f ¯2i3
3.605551275ah0.3436
      7 'r' f ¯2i3
3.605551275ar2.159
      7 'u' f ¯2i3
3.605551275au0.3436

At the moment because Format-By-Example (L⍕R for Character Vector L) is not implemented in NARS2000, ⎕FC[3] is not referenced.

Because the system function ⎕FMT has its own Symbol Substitution mechanism, it is not sensitive to the settings in ⎕FC.

System Variables (A value may be assigned to these except for ⎕DM)
ALX CT DM DT ELX FC FEATURE FPC IC IO
LR LX PP PR PW RL SA WSID
Niladic System Functions (a value cannot be assigned to these)
A AV EM ET LC NNAMES NNUMS SI SYSID SYSVER
T TC TCBEL TCBS TCESC TCFF TCHT TCLF TCNL TCNUL
TS WA
Monadic or dyadic system functions (a value cannot be assigned to these)
AT CR DC DFT DL DR EA EC ERROR ES
EX FMT FX MF NAPPEND NC NCREATE NERASE NINFO NL
NLOCK NREAD NRENAME NREPLACE NRESIZE NSIZE NTIE NUNTIE STOP TF
TRACE UCS VR
Note that quad functions and variables (except for the ⎕A family of functions) are case insensitive


See Also
System Commands System Variables and Functions Operators


Keyboard
Alt+Shift
Alt ¨ ¯ < > × ÷
Shift ~ ! @ # $ % ^ & * ( ) _ +
Key ` 1 2 3 4 5 6 7 8 9 0 - =
Alt+Shift
Alt ? § π
Shift Q W E R T Y U I O P { } |
Key q w e r t y u i o p [ ] \
Alt+Shift
Alt
Shift A S D F G H J K L : "
Key a s d f g h j k l ; '
Alt+Shift χ
Alt
Shift Z X C V B N M < > ?
Key z x c v b n m , . /
NARS 2000 Lang
Tool
Bar
+ - × ÷ * ! ? |
< = >
~ § π .. ,
/ \ ¨ .
_ ¯
Second Row i j k i j k l g p r v x

[[Category:Mouse Group {{{1}}}|{{{2}}}]]




This NARS2000 article is a stub and needs further work.