CXX=clang++ CC=clang ./configure --prefix=/opt/kea --enable-shell --with-log4cplus=/usr/local --with-pgsql=/usr/local/bin/pg_config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-hook 'text-mode-hook 'turn-on-auto-fill) | |
(add-hook 'text-mode-hook | |
'(lambda() (set-fill-column 38))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\\ fuehrende nullen | |
: dec. ( ud -- ) | |
0 | |
BEGIN | |
>R | |
&10 ud/mod 2dup d0= | |
R> 1+ swap | |
UNTIL | |
-rot 2drop | |
&10 - abs 0 ?DO 0 LOOP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( simple string words for Atari FIG-FORTH, ) | |
( adapted from the Book "Forth Applications" ) | |
( by S.D. Roberts ) | |
HEX | |
( helping word that jumps over an inline ) | |
( compiled string in the dictionary) | |
: ["] R COUNT DUP 1+ R> + >R ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> dlist curr | |
8050: 8 BLANK | |
8051: 8 BLANK | |
8052: 8 BLANK | |
8053: LMS 8150 MODE F | |
8056: MODE F | |
8057: MODE F | |
8058: MODE F | |
8059: MODE F | |
805A: MODE F |
Die Hausaufgabe besteht diesmal aus zwei unabhängigen Teilen. Such Dir heraus, was Dich interessiert und Dir Spass macht.
Eine mögliche Lösung zu der Hausaufgabe vom 10. August findest Du unter https://gist.github.com/cstrotm/00c96d36391668fa169a076b227bc23a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: BOUNDS ( addr len -- limit start ) | |
over + swap ; | |
\ simple 1 Byte hash 0-$FF | |
: HASH ( addr -- hash ) | |
count \ get addr len from string addr | |
$1F AND \ limit length of string | |
tuck bounds \ setup loop | |
?DO \ loop over string | |
I C@ + \ add char values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aufgabe: | |
wir bauen die "Dictionary" Datenstruktur aus Python in Forth | |
https://realpython.com/python-dicts/ | |
Nicht zu verwechseln mit dem Forth-Dictionary, welches die definierten | |
Forth-Wörter enthält. | |
Dazu bauen wir auf der schon bekannten Datenstruktur "Array" auf. Unser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ Simple Hash Function in Forth | |
: BOUNDS ( addr len -- limit start ) | |
over + swap ; | |
\ simple 1 Byte hash 0-$FF | |
: HASH ( addr len -- hash ) | |
$1F AND \ limit length of string | |
tuck bounds \ setup loop | |
?DO \ loop over string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: (ARRAYERROR ABORT" Array out of bounds!" ; | |
: CARRAY ( size -- ) | |
CREATE DUP , ALLOT | |
DOES> ( i -- addr ) |
NewerOlder