Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
4
Task/Enumerations/Forth/enumerations-1.fth
Normal file
4
Task/Enumerations/Forth/enumerations-1.fth
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
0 CONSTANT apple
|
||||
1 CONSTANT banana
|
||||
2 CONSTANT cherry
|
||||
...
|
||||
1
Task/Enumerations/Forth/enumerations-2.fth
Normal file
1
Task/Enumerations/Forth/enumerations-2.fth
Normal file
|
|
@ -0,0 +1 @@
|
|||
: ENUM ( n -<name>- n+1 ) DUP CONSTANT 1+ ;
|
||||
1
Task/Enumerations/Forth/enumerations-3.fth
Normal file
1
Task/Enumerations/Forth/enumerations-3.fth
Normal file
|
|
@ -0,0 +1 @@
|
|||
0 ENUM APPLE ENUM BANANA ENUM CHERRY DROP
|
||||
1
Task/Enumerations/Forth/enumerations-4.fth
Normal file
1
Task/Enumerations/Forth/enumerations-4.fth
Normal file
|
|
@ -0,0 +1 @@
|
|||
0 ENUM FIRST ENUM SECOND ... CONSTANT LAST
|
||||
2
Task/Enumerations/Forth/enumerations-5.fth
Normal file
2
Task/Enumerations/Forth/enumerations-5.fth
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
: SIZED-ENUM ( n s -<name>- n+s ) OVER CONSTANT + ;
|
||||
: CELL-ENUM ( n -<name>- n+cell ) CELL SIZED-ENUM ;
|
||||
6
Task/Enumerations/Forth/enumerations-6.fth
Normal file
6
Task/Enumerations/Forth/enumerations-6.fth
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
0 ENUM FIRST \ value = 0
|
||||
CELL-ENUM SECOND \ value = 1
|
||||
ENUM THIRD \ value = 5
|
||||
3 SIZED-ENUM FOURTH \ value = 6
|
||||
ENUM FIFTH \ value = 9
|
||||
CONSTANT SIXTH \ value = 10
|
||||
4
Task/Enumerations/Forth/enumerations-7.fth
Normal file
4
Task/Enumerations/Forth/enumerations-7.fth
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
: CONSTANTS ( n -- ) 0 DO I CONSTANT LOOP ;
|
||||
|
||||
\ resistor digit colors
|
||||
10 CONSTANTS black brown red orange yellow green blue violet gray white
|
||||
Loading…
Add table
Add a link
Reference in a new issue