RetroForum Welcome, Guest. Please login or register.
September 03, 2010, 10:54:48 PM
Home Help Search Calendar Login Register

RetroForth Discussion  |  Main  |  Discussion  |  Topic: how to include retro-ans.fs « previous next »
Pages: 1 Go Down Print
Author Topic: how to include retro-ans.fs  (Read 1710 times)
PaulWiegmans
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
how to include retro-ans.fs
« on: July 15, 2007, 05:16:27 PM »

Hello ,

I'm looking into Retroforth as I find it an interesting forth to use on Linux that is also easy to understand ans may be possible to use it to control some hardware connected to parallel port. I am using version 9.2.10  (of whatever version getretro.sh has installed for me). I have difficulty using retro-ans.fs thats providing a ANS-compatibility layer. When i try

Code:
$ retro
load "retro-ans.fs" \f

I can't see that there are additional words defined with "words". Doing

Code:
$ retro < retro-ans.fs

leaves me with a eternal loop displaying "ok" on each line. What am I doing wrong? How can I include this file in retro?

thanks in advance...


Logged
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Re: how to include retro-ans.fs
« Reply #1 on: July 17, 2007, 12:57:46 PM »

Try this:

Code:
retro -f retro-ans.fs

Or, from within RetroForth:

Code:
-f retro-ans.fs
Logged
PaulWiegmans
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
Re: how to include retro-ans.fs
« Reply #2 on: July 17, 2007, 08:41:02 PM »

Try this:

Code:
retro -f retro-ans.fs

Or, from within RetroForth:

Code:
-f retro-ans.fs


Thanks  a lot. That does the trick. Also I had a broken retro-ans.fs as the file had no content at all at some point. I noticed that Retro stops compiling after having compiled exception:  when I load retro-ans.fs like this:

Code:
retro < retro-ans.fs

I noticed that when I typed
Code:
;
retro responded normally. For some reason it hung in compile state after evaluation retro-ans.fs.
Is this a bad way to include a source file?
Logged
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Re: how to include retro-ans.fs
« Reply #3 on: July 17, 2007, 11:21:59 PM »

Quote
Is this a bad way to include a source file?

Yes. This redirects the file to the stdin device (normally the keyboard). Unless the file ends with "bye", to exit Retro properly, it could hang, crash, etc. It's really a bad thing to do most of the time.
Logged
Pages: 1 Go Up Print 
RetroForth Discussion  |  Main  |  Discussion  |  Topic: how to include retro-ans.fs « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Valid XHTML 1.0! Valid CSS!