


Further notes
1
for positive, and n(n + 1)(n + 2)
(-1) for negative integers. FAC(0) is
1, as usual.
|
|
| n <= 0 | RANDOM always returns zero |
| 0 < n < 65536 | RANDOM returns a pseudo random number in the integer interval [0,65534] |
| n > 65535 | RANDOM works as if RANDOM(65535) were invoked |
'E:\FOO\SILLY.DAT'.
dddddddd.TMP
where each d is a randomly chosen decimal digit. That means that
61524212.TMP
is one possible unique name. After one name is created, UNIQUE checks if it already exists (by trying to open it for reading). If it fails, the name is ok. Otherwise the procedure is repeated. If UNIQUE fails to generate a non-existing file name 10 times, it aborts and returns '?'.
'C:\CONFIG.SYS'
a try (because most systems boot from C:). If this also fails, they abort
and return a default value, which is as follows (from my DOS 3.30
manual):
| BUFFERS | 15 if memory>521k, which is assumed |
| COUNTRY | 001 |
| DEVICE | returns 0 if failure or device not found |
| FCBX | 4 |
| FCBY | 0 |
| FILES | 8 |
| LASTDRIVE | E |
| SHELL | see below |
| STACKY | 9 |
| STACKY | 128 |
d:\COMMAND.COM' is
returned (with d being the boot drive), otherwise '?:\COMMAND.COM' is
returned.
| Key | Char after #0 | Code of char |
| F1 | ; | 59 |
| F2 | < | 60 * |
| F3 | = | 61 |
| F4 | > | 62 * |
| F5 | ? | 63 |
| F6 | @ | 64 |
| F7 | A | 65 |
| F8 | B | 66 |
| F9 | C | 67 |
| F10 | D | 68 |
| LEFT | K | 75 |
| RIGHT | M | 77 |
| UP | H | 72 |
| DOWN | P | 80 |
| PAGE UP | I | 73 |
| PAGE DOWN | Q | 81 |
| INS | R | 82 |
| DEL | S | 83 |
| POS 1 | G | 71 |
| END | O | 79 |
There's a problem with the two codes marked with '*', because the chars '>' and '<' are interpreted by DOS. You will be able to use these only if your shell has a possibility to pass them to programs.
Example: The following call
|
| Cursor Left | Back one character |
| Cursor Right | Forward one character |
| Delete | Delete character under the cursor |
| End | Goto the last character |
| Pos 1 | Goto the first character |
| Ins | Toggle insert (default) and overwrite mode |
| Return | Terminate input |
| Ctrl/H (Backspace) | Delete character before the cursor |
| Ctrl/Y | Delete the whole string and start again |
| Format | Example |
| dd.mm.yyyy | 4.12.1963 |
| mm-dd-yyyy | 12-4-1963 |
| mm/dd/yyyy | 12/4/1963 |
/f option to read a file
containing several assignments. IF and AIF can be used in most cases where
the DOS IF statement could have been used (which is not possible in ASET
files).

