Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > de.comp.lang.forth > #629
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | de.comp.lang.forth |
| Subject | Re: Newbie: Forth Runtime detection |
| Date | 2020-12-31 11:28 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2020Dec31.122851@mips.complang.tuwien.ac.at> (permalink) |
| References | <1a1acf27-52f5-412a-b3c7-3710143b1dd0n@googlegroups.com> |
Sebastian <sebastian.nerger@googlemail.com> writes:
>Hallo,
>kann ich zur Laufzeit erkennen, welches Forth system Verwendung findet? Als=
>o gibt es ein word, welches z.B. gforth zur=C3=BCckgibt (am besten mit Vers=
>ion)?
Wenn Du wissen willst, ob es Gforth ist, kannst Du folgendes machen:
s" gforth" environment? [if] 2drop
\ gforth-spezifischer Code
...
[else]
...
[then]
Wenn Du etwas fuer etwas ab Version 0.7.0 von Gforth machen willst,
dann kannst Du das wie folgt erweitern:
s" gforth" environment? [if] ( c-addr u )
s" 0.7.0" compare 0>= [if]
\ code fuer gforth >=0.7.0:
...
[else]
...
[then]
[else]
...
[then]
Andere Forth-Systeme haben ihre eigenen Mechanismen fuer solche
Abfragen. Ein standardisiertes Wort fuer die Abfrage des Systems und
der Version gibt es nicht.
- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
Back to de.comp.lang.forth | Previous | Next — Previous in thread | Find similar
Newbie: Forth Runtime detection Sebastian <sebastian.nerger@googlemail.com> - 2020-12-31 02:02 -0800 Re: Newbie: Forth Runtime detection anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2020-12-31 11:28 +0000
csiph-web