Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > copy/pasting in...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 3993 of 4050
Post > Topic >>

copy/pasting into a terminal

by "David N. Williams" <williams@[EMAIL PROTECTED] > Apr 9, 2008 at 10:18 PM

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




 8 Posts in Topic:
copy/pasting into a terminal
"David N. Williams&q  2008-04-09 22:18:56 
Re: copy/pasting into a terminal
"David N. Williams&q  2008-04-09 22:22:27 
Re: copy/pasting into a terminal
Josh Grams <josh@[EMAI  2008-04-09 22:31:56 
Re: copy/pasting into a terminal
Dennis Ruffer <druffer  2008-04-09 22:47:45 
Re: copy/pasting into a terminal
"David N. Williams&q  2008-04-09 23:26:00 
Re: copy/pasting into a terminal
"David N. Williams&q  2008-04-10 14:12:30 
Re: copy/pasting into a terminal
Bernd Paysan <bernd.pa  2008-04-10 16:30:43 
Re: copy/pasting into a terminal
"David N. Williams&q  2008-04-10 11:00:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 3:26:40 CDT 2008.