Discussion:
ntime missng in gforth 0.7.3
(too old to reply)
Jose Morales
2022-10-30 10:29:36 UTC
Permalink
Hi, does anyone know where the source of the gforth words are at in the repository. I'm finding that some of the supplied extensions don't seem to work. I started with random.fs... I've not been successful in compiling any of the provided examples because of missing words dependencies.

Thanks.

Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
ok
ok
ok
Variable seed ok
ok
$10450405 Constant generator ok
ok
: rnd ( -- x ) seed @ generator um* drop 1+ dup seed ! ; ok
: seed-init ( -- ) ntime drop seed +! rnd drop ;
:9: Undefined word
: seed-init ( -- ) >>>ntime<<< drop seed +! rnd drop ;
Anton Ertl
2022-10-30 11:03:46 UTC
Permalink
Hi, does anyone know where the source of the gforth words are at in the rep=
ository. I'm finding that some of the supplied extensions don't seem to wor=
k. I started with random.fs... I've not been successful in compiling any of=
the provided examples because of missing words dependencies.=20
The random.fs that comes with gforth-0.7.3 works with gforth-0.7.3.
It seems that you try to use a more recent random.fs with
gforth-0.7.3.

Concerning your question, NTIME is a primitive, and you can find its
source code in prim. But it is somewhat involved to add it to
gforth-0.7.3. You might just as well just install a recent snapshot,
which includes NTIME.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: https://euro.theforth.net
Jose Morales
2022-10-30 11:18:02 UTC
Permalink
Post by Anton Ertl
Hi, does anyone know where the source of the gforth words are at in the rep=
ository. I'm finding that some of the supplied extensions don't seem to wor=
k. I started with random.fs... I've not been successful in compiling any of=
the provided examples because of missing words dependencies.=20
The random.fs that comes with gforth-0.7.3 works with gforth-0.7.3.
It seems that you try to use a more recent random.fs with
gforth-0.7.3.
Ah, fantastic!

S" /usr/share/gforth/0.7.3/random.fs" ok
ok
ok
ok

Thank you!
jem...@gmail.com
2022-10-30 12:11:04 UTC
Permalink
Post by Jose Morales
Post by Anton Ertl
Hi, does anyone know where the source of the gforth words are at in the rep=
ository. I'm finding that some of the supplied extensions don't seem to wor=
k. I started with random.fs... I've not been successful in compiling any of=
the provided examples because of missing words dependencies.=20
The random.fs that comes with gforth-0.7.3 works with gforth-0.7.3.
It seems that you try to use a more recent random.fs with
gforth-0.7.3.
Ah, fantastic!
S" /usr/share/gforth/0.7.3/random.fs" ok
ok
ok
ok
Thank you!
Sorry I pasted the wrong test... : )

gforth /usr/share/gforth/0.7.3/random.fs
Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
ok
ok
ok
10 random . 9 ok

Loading...