I've modified some string words that collect or search across
lines so they echo CR's when the lines are entered interactively
at the terminal.
To test them, I thought, why not paste the existing test file
into the terminal window? That worked pretty well with pfe,
except for one test that used an embedded tab as a whitespace
delimiter. The pfe terminal intercepts tabs for autocompletion,
and it seems that neither tabs nor surrogate blanks get into the
terminal input buffer.
Pasting with gforth didn't work at all. Here's a made-up
example.
If I paste the following into a gforth terminal window (Mac OS X
Leopard, powerpc):
\ RSTUVWXYZ
\ RSTUVWXYZ
I get
[jost:~/strings] dnwills% gforth
S
TUVWXYZ1R6.9-20070604, Copyright (C) 1995-2006 Free Software Foundation,
Inc.
:2: Undefined wordABSOLUTELY NO WARRANTY; for details type `license'
>>>STUVWXYZ<<<exit
Backtrace:
$204FCC throw
$2115E0 no.extensions
$205144 interpreter-notfound1
The cursor is sitting on the first "6" in the second line, and
the first two lines are actually one wrapped line in the
80-character terminal display -- I've inserted a line break
before the leading "T".
The same thing with pfe gives:
[jost:~/strings] dnwills% pfe
\ Portable Forth Environment 0.33.61 (Jul 6 2007 12:00:46)
Copyright (C) Dirk Uwe Zoller 1993 - 1995.
Copyright (C) Tektronix, Inc. 1998 - 2003.
ANS/ffa ITC Forth - Please enter LICENSE and WARRANTY.
Running on powerpc darwin8.10.0 - to quit say BYE. ok
\ RSTUVWXYZ ok
\ RSTUVWXYZ ok
Since the details of terminal input behavior are implementation
dependent, it's not surprising that there are differences
between the two systems. But is there a way to paste mostly
normal Forth source from a file into the gforth terminal and
have it run? Or is it just my OS X system?
-- David


|