Minor fixes in 1990/dds/README.md
Format fixes in README.md including making unordered lists to make the rendered content easier to read and follow. I've also become aware of a problem with the way the author formatting was done in recent days in the README.md files that now have to all be fixed: there needs to be spaces after each line or else the author information will be one line which is definitely wrong. I think the only one I got this right is, ironically or not :-), my own entries, namely because I wanted to make sure that they looked okay (I did 'make sure' that some of the others did too but that was to changes that I was unsure of .. ironically leaving out one I should have known but probably just forgot). Thus many pull requests will be made unless I do it in a mass fix which I suppose is possible to save time.
This commit is contained in:
1 parent
846ff351e0
commit
081876e662
1 file changed
+70
-60
+70
-60
@@ -1,10 +1,10 @@
|
|||||||
# Best Language Tool
|
# Best Language Tool
|
||||||
|
|
||||||
Diomidis Spinellis
|
Diomidis Spinellis
|
||||||
Imperial College, University of London
|
Imperial College, University of London
|
||||||
Myrsinis 1
|
Myrsinis 1
|
||||||
GR-145 62 Kifissia
|
GR-145 62 Kifissia
|
||||||
Greece
|
Greece
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
@@ -16,26 +16,28 @@ you Yusuke!
|
|||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) removed the erroneous
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) removed the erroneous
|
||||||
prototype to `fopen()` and made this use `fgets()` instead of `gets()` to make
|
prototype to `fopen()` and made this use `fgets()` instead of `gets()` to make
|
||||||
it safer and to prevent a potentially alarming warning at linking or runtime.
|
it safer and to prevent a potentially alarming warning at compiling and/or
|
||||||
Thank you Cody for your assistance!
|
linking and/or runtime. Thank you Cody for your assistance!
|
||||||
|
|
||||||
## To run
|
## To run
|
||||||
|
|
||||||
./dds
|
```sh
|
||||||
|
./dds
|
||||||
|
```
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
Give the following lines as input:
|
Give the following lines as input:
|
||||||
|
|
||||||
OLD LANDER.BAS
|
```
|
||||||
RUN
|
OLD LANDER.BAS
|
||||||
|
RUN
|
||||||
|
```
|
||||||
|
|
||||||
NOTE: this is case sensitive.
|
NOTE: this is case sensitive.
|
||||||
|
|
||||||
## Judges' comments:
|
## Judges' comments:
|
||||||
|
|
||||||
|
|
||||||
Be sure not to run out of fuel!
|
Be sure not to run out of fuel!
|
||||||
|
|
||||||
|
|
||||||
@@ -43,40 +45,53 @@ Be sure not to run out of fuel!
|
|||||||
|
|
||||||
This is the DDS-BASIC Interpreter (Version 1.00).
|
This is the DDS-BASIC Interpreter (Version 1.00).
|
||||||
|
|
||||||
Immediate commands:
|
### Immediate commands:
|
||||||
|
|
||||||
RUN LIST NEW OLD filename
|
- RUN
|
||||||
BYE SAVE filename
|
- LIST
|
||||||
|
- NEW
|
||||||
|
- OLD filename
|
||||||
|
- BYE
|
||||||
|
- SAVE filename
|
||||||
|
|
||||||
Program commands:
|
### Program commands:
|
||||||
|
|
||||||
variable names a to z variables initialized to 0 on RUN
|
- variable names a to z
|
||||||
FOR var = exp TO exp NEXT variable
|
- variables initialized to 0 on RUN
|
||||||
GOSUB exp RETURN
|
- FOR var = exp TO exp
|
||||||
GOTO exp IF exp THEN exp
|
- NEXT variable
|
||||||
INPUT variable PRINT string
|
- GOSUB exp
|
||||||
PRINT exp var = exp
|
- RETURN
|
||||||
REM any text END
|
- GOTO exp
|
||||||
|
- IF exp THEN exp
|
||||||
|
- INPUT variable
|
||||||
|
- PRINT string
|
||||||
|
- PRINT exp
|
||||||
|
- var = exp
|
||||||
|
- REM any text
|
||||||
|
- END
|
||||||
|
|
||||||
Expressions (ranked by precedence):
|
### Expressions (ranked by precedence):
|
||||||
|
|
||||||
Bracketed expressions
|
- Bracketed expressions
|
||||||
number (leading 0 for octal, 0x for hex, else decimal), variable
|
- number (leading 0 for octal, 0x for hex, else decimal), variable
|
||||||
Unary -
|
- Unary -
|
||||||
* /
|
- `*` `/`
|
||||||
+ -
|
- `+` `-`
|
||||||
= <>
|
- `=` `<>`
|
||||||
> <
|
- `>` `<`
|
||||||
<= >=
|
- `<=` `>=`
|
||||||
(* and + are also used for boolean AND and boolean OR)
|
|
||||||
Boolean expressions evaluate to 0 for false and 1 for true
|
|
||||||
|
|
||||||
Editing:
|
(`*` and `+` are also used for boolean AND and boolean OR)
|
||||||
|
|
||||||
|
Boolean expressions evaluate to 0 for false and 1 for true.
|
||||||
|
|
||||||
|
### Editing:
|
||||||
|
|
||||||
- Line editor using line re-entry.
|
- Line editor using line re-entry.
|
||||||
- A line number with nothing following it, deletes the line.
|
- A line number with nothing following it, deletes the line.
|
||||||
|
|
||||||
Input format:
|
### Input format:
|
||||||
|
|
||||||
- Free format positioning of tokens on the line.
|
- Free format positioning of tokens on the line.
|
||||||
- No space is allowed before the line number.
|
- No space is allowed before the line number.
|
||||||
@@ -85,38 +100,33 @@ Input format:
|
|||||||
- ALL INPUT MUST BE UPPERCASE.
|
- ALL INPUT MUST BE UPPERCASE.
|
||||||
|
|
||||||
|
|
||||||
Limits:
|
### Limits:
|
||||||
|
|
||||||
Line numbers 1-10000
|
- Line numbers 1-10000
|
||||||
Line length 999 characters
|
- Line length 999 characters
|
||||||
FOR nesting 26
|
- FOR nesting 26
|
||||||
GOSUB 999 levels
|
- GOSUB 999 levels
|
||||||
Program Dynamically allocated
|
- Program Dynamically allocated
|
||||||
Expressions -32768 - 32767 for 16 bit machines,
|
- Expressions -32768 - 32767 for 16 bit machines, -2147483648 - 2147483647 for 32 bit machines
|
||||||
-2147483648 - 2147483647 for 32 bit machines
|
|
||||||
|
|
||||||
Error checking / error reports:
|
|
||||||
|
|
||||||
|
### Error checking / error reports:
|
||||||
|
|
||||||
No error checking is performed.
|
No error checking is performed.
|
||||||
It might dump core if a syntax or semantic error is encountered.
|
It might dump core if a syntax or semantic error is encountered.
|
||||||
|
|
||||||
|
### Hosting Environment:
|
||||||
|
|
||||||
Hosting Environment:
|
ANSI C, traditional K&R C or OSF ANDF ASCII or EBCIDIC character set 48K bytes
|
||||||
|
memory.
|
||||||
|
|
||||||
ANSI C, traditional K&R C or OSF ANDF
|
The Speed of DDS-BASIC Interpreter (Version 1.00) relative to Microsoft Advanced
|
||||||
ASCII or EBCIDIC character set
|
BASIC 3.31 is approximately 60%.
|
||||||
48K bytes memory
|
|
||||||
|
|
||||||
The Speed of DDS-BASIC Interpreter (Version 1.00). relative to
|
The code size could be further reduced by doing ugly things like not declaring
|
||||||
Microsoft Advanced BASIC 3.31 is Approximately 60%.
|
the return type of functions, not freeing memory, #defining define, and joining
|
||||||
|
lines. In its present 1536 character form the program is reasonably portable
|
||||||
The code size could be further reduced by doing ugly things like
|
(it may fail to run in a tagged object architecture) and nicely formatted (it
|
||||||
not declaring the return type of functions, not freeing memory,
|
fits in an `80*25` screen).
|
||||||
#defining define, and joining lines. In its present 1536 character
|
|
||||||
form the program is reasonably portable (it may fail to run in a
|
|
||||||
tagged object architecture) and nicely formatted (it fits in an
|
|
||||||
80*25 screen).
|
|
||||||
|
|
||||||
## Copyright and CC BY-SA 4.0 License:
|
## Copyright and CC BY-SA 4.0 License:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user