Initialization and Workspace Files

From NARS2000
Revision as of 01:26, 23 May 2008 by WikiSysop (talk | contribs) (New page: =Initialization File= Global program settings saved and restored for the next time the program is started are saved in a file named <b>NARS2000.ini</b>. By default, this file is saved in...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Initialization File

Global program settings saved and restored for the next time the program is started are saved in a file named NARS2000.ini. By default, this file is saved in the current user's Windows Application Data directory in a subdirectory named (what else) NARS2000.

The format of this file follows that of all other .ini files. The sections are named as follows:

  • The [General] section contains version, size, position, and state information about the program window.
  • The [Fonts] section contains information about the fonts assigned to each type of window under the program window: FE for the Function Editor window, ME for the Matrix Editor window (when implemented), SM for the Session Manager window, TC for the Tab Control window, and VE for the Vector Editor window (when implemented).
  • The [SysVars] section contains the values for each of the system variables to be used when a Clear WS is loaded.

Edit this file at your own risk.

Workspace Files

When a workspace is saved, a plain text version of it is saved on disk in a file named WorkspaceName.ws.nars. By default, this file is saved in the user's Application Data\NARS2000 directory in a subdirectory named workspaces, although you may choose to save it anywhere else by including the full path to the workspace in the )WSID or )SAVE commands.

The format of this file follows that of all other .ini files. The sections are named as follows:

  • The [General] section contains version, SI Level, and Creation Time information about the workspace.
  • The [Globals] section contains definitions of all global (as opposed to immediate) objects in the workspace.
    The keyname for each item in this section is of the form :ggg where ggg is a sequential non-negative integer. These items are referenced elsewhere in the workspace file, possibly multiple times, thus allowing reference counts to be preserved over a )SAVE and )LOAD.

    For example, the entries

    :0=V C 3 1 3 '{quad}DM'
    :1=V C 6 1 6 '.,*0_{overbar}'
    :2=V I 13 1 13 3 4 2 2 2 1 2 2 1 2 2 2 1
    :3=V C 0 1 0 ''

    represent the default values for ⎕ALX/⎕ELX, ⎕FC, ⎕IC, and ⎕LX.
  • The [Vars.sss] section, where sss is an SI Level, contains definitions of all variables at this SI Level (note that multiple SI Levels are not supported as yet). Each item is of the form

    KeyName=VarName=VarValue. The KeyName is of the form nnn which is a sequential non-negative integer. The VarName is the name of the variable (with some characters translated to {symbol} form. The VarValue is of the form :ggg if the variable is global (referring to an entry in the [Globals] section), or NameType DataType NELM Rank Shape Values if immediate.

    Immediate values have a NameType of V for a variable and F for a function, and a DataType of A for an Arithmetic Progression Array, B for a Boolean, C for a character, F for a double-precision float, I for a 64-bit integer, H for a heterogeneous array, and N for a nested array. The NELM (Number of Elements), Rank, and Shape are all non-negative integers where the Shape has Rank number of values.