home *** CD-ROM | disk | FTP | other *** search
- Godel Calc
- The Self-Referential SpreadSheet Program
- Version 0.01
- by
- Jamie Mueller
-
- Godel Calc is a simple spreadsheet program that allows multiple sheets
- to be open at once (up to 20). Each sheet can have references to the other
- sheets (which get automatically loaded if done correctly).
-
- Basically the cell formulas look something similar to:
-
- =A0+B2+sin(B6)*cos([3,4])
-
- The cell references can either be alphanumeric (e.g. B6) or in [column,row]
- format. When you use the [column,row] format the numbers in the brackets
- can be references to other cells (e.g. [B1,C2] or [ [1,2],[3,4] ] or
- [B1,[3,4]] etc.). They can even be formula's of some sort: [Sin(a0),0]
- although some formulas won't be too helpful (like the above Sin(a0)!).
- (This is where some of the self-reference comes in)
-
- If you really want Godel Calc to perform loops you must have either 2.04
- or ARexx. Godel Calc uses ARexx scripts for its macros in three separate
- places: You can specify macros for the Alt-F1 through Alt-F10 keys in the
- files AF1.gcs through AF10.gcs (.gcs for Godel Calc Script). You can have
- macros show up on the menu under the ARexx heading (a maximum of 15). These
- files end in the extension .gcmn (for Godel Calc MeNu). Finally you can
- reference a macro directly from a cell within the spreadsheet and this
- macro can reference anything on any spreadsheet loaded! These files end in
- the extension .gcfn (for Godel Calc FunctioN). There is no limit to the
- amount of ARexx functions you can have for Godel Calc.
-
- Godel Calc Menu Items:
-
- Project:
- New: This selection opens up a new blank spreadsheet.
-
- Open: This selection allows you to open a new spreadsheet.
-
- Save: This selection will save the current spreadsheet to a file.
-
- Save As: This selection will save the current spreadsheet to a new file.
-
- Close: This selection will close the current spreadsheet and not save
- it.
-
- Exit: Exit Godel Calc.
-
- Edit:
- Insert:
- Row: Inserts a row at the current cursor location.
-
- Column: Inserts a column at the current cursor location.
-
- Delete:
- Cell: Deletes a cell or the marked block of cells
-
- Row: Deletes the row at the current cursor location.
-
- Column: Deletes the column at the current cursor location.
-
- Fill:
- Right: Takes the current marked block and fills the block
- with the left column of the marked block.
-
- Down: Takes the current marked block and fills the block
- with the top row of the marked block.
-
- Options:
- Recalc:
- On: Turns on automatic recalculation.
-
- Off: Turns off automatic recalculation (default).
-
- Now: Recalculates the current spreadsheet.
-
- Formats:
- Column Width: Sets the current or marked range of columns to a specified
- width (default 10).
-
- Decimals: Sets the number of digits to the right of the decimal point
- to be printed (default 0).
-
- ARexx:
- Items under this menu are the filenames of the scripts to execute when
- the items are selected.
-
- Note: When using the Fill Right, Down, or Insert Row, or Column the cell
- references in the formulas are updated unless they are preceeded by a dollar
- sign ($). The dollar sign ($) must preceed EVERY item that you wish not
- to be changed (e.g. $a$0 will keep both row and column references, just $a0
- will mean the 0 can change, etc.). This does not apply to cell references
- that take the form [col,row] these do not get changed and must be updated
- manually.
-
- Godel Calc allows the following functions:
-
- sqrt() abs() sin() cos() tan() atan() ln()
- exp() sinh() cosh() tanh() u() sum(range) ave(range)
- atan2(,) ceil() floor() mod(,) max(range) min(range)
-
- The functions that have no argument listed take just one, ones with a
- comma take two arguments, the range is identified by cell:cell.
-
- If Godel_Calc sees a function of this form name() it searches the above
- list and if no match is found it looks for a file of the name name.gcfn
- If the file exists it is executed as an ARexx script with the arguments
- passed in followed by the title of the spreadsheet that is calling the
- function. An example function rad() that calculates radians from degrees
- is shown below:
-
- /* convert degrees to radians */
- parse arg num sheet
- radian=num*3.141592657
- radian=radian/180.0
- return radian
-
- Currently the following commands are available to an ARexx script from
- Godel Calc:
-
- NEW title
- EXIT
- CLOSE sheet
- MOVE TO cell sheet
- MOVE UP n sheet
- MOVE DOWN n sheet
- MOVE LEFT n sheet
- MOVE RIGHT n sheet
- ENTER string sheet
- RECALC sheet
- SAVE sheet
- OPEN sheet
- EVL formula sheet Evaluate (make sure OPTIONS RESULTS is on)
- INSERT ROW sheet
- INSERT COLUMN sheet
- ARC ON sheet Auto Recalc
- ARC OFF sheet
- DELETE CELL sheet
- DELETE ROW sheet
- DELETE COLUMN sheet
- FORMAT COLUMNS n sheet
- FORMAT DECIMALS n sheet
- MARK range sheet
- FILL RIGHT sheet
- FILL DOWN sheet
-
- where: n is a number, sheet is the title of a sheet, formula is a valid
- formula, string is a string, and cell is either in A0 form or [col,row]
- form.
-
- The commands that change a cell (like ENTER, INSERT, DELETE, etc.) change
- whereever the cursor is currently at, to move it use the MOVE command.
-
- Unfortunately at this point in time the range for MARK range can *ONLY* be
- in the alphanumeric format (e.g. A3:B12) and not in the [col,row]:[col,row]
- format..this will be changed.
-
- To mark a block use the shift-arrow keys...
-