my astonishingly transient Pad 
Author Message
 my astonishingly transient Pad

Anybody know if/where people have tried to post onto the web sketches
the kinds of errors that newbies make in Forth?

Quote:
> 3.3.3.6 Other transient regions ...
> [The Pad may move when CODE OR data space is allocated.]
> A.6.2.2000 Pad
> [No standard words use I.E. STORE INTO the Pad BUT MANY MAY MOVE IT.]

I'm inspired to ask by having experienced recently the pain of failing
to infer, by way of "3.3.2 Code space", the text missing from the Ans
standard that I show here above as UPPERCASE.

The erroneous code I wrote by way of some immediate words eventually
boiled down to the equivalent of the ambiguous phrase:



allocates code like data and defines pad as an offset from here:

        : pad here 123 + ;

Quote:
> ...

Anybody know if/where people have tried to post onto the web sketches
the kinds of errors that newbies make in Forth?  Elsewhere in
comp.lang, such sketches appear as part of the FAQ?

Thanks in advance.    Pat LaVarre



Tue, 23 Mar 2004 00:00:27 GMT  
 my astonishingly transient Pad

Quote:

> Anybody know if/where people have tried to post onto the web sketches
> the kinds of errors that newbies make in Forth?

        And what makes you think old pros never make these
        kinds of errors?  I speak for myself alone, of course ;-)

--
Julian V. Noble
Professor of Physics

Galileo's Commandment:

   "Science knows only one commandment: contribute to science."
   -- Bertolt Brecht, "Galileo".



Tue, 23 Mar 2004 00:29:25 GMT  
 my astonishingly transient Pad

Quote:

> Anybody know if/where people have tried to post onto the web sketches
> the kinds of errors that newbies make in Forth?

> > 3.3.3.6 Other transient regions ...
> > [The Pad may move when CODE OR data space is allocated.]

> > A.6.2.2000 Pad
> > [No standard words use I.E. STORE INTO the Pad BUT MANY MAY MOVE IT.]

The relevant warning _is_ 3.3.3.6 Other Transient regions:
 "...Their addresses and contents may become invalid after:
-- a definition is created via a defining word
-- definitions are compiled with : or :NONAME
-- data space is allocated using ALLOT, , (comma), C, (c-comma), or ALIGN."

Perhaps it may have been clearer to describe the first 2 items as "any
compiling or defining action," because that was what was meant.
In other words, using PAD intermingled with any defining action is
likely to cause trouble.

Quote:
> I'm inspired to ask by having experienced recently the pain of failing
> to infer, by way of "3.3.2 Code space", the text missing from the Ans
> standard that I show here above as UPPERCASE.

> The erroneous code I wrote by way of some immediate words eventually
> boiled down to the equivalent of the ambiguous phrase:



Yes, clearly the difficulty here is caused by the literal being compiled.

Quote:

> allocates code like data and defines pad as an offset from here:

>         : pad here 123 + ;

HERE, incidentally, refers to the next available location in _data space_.
In many implementations, data space is comingled with code space, which
is why compiling may affect it, but you should be aware that in some
systems (e.g. cross-compilers for embedded systems) code space and
data space are allocated independently and in different regions.

Quote:
> Anybody know if/where people have tried to post onto the web sketches
> the kinds of errors that newbies make in Forth?  Elsewhere in
> comp.lang, such sketches appear as part of the FAQ?

I have taught introductory Forth courses for >25 years, and the list
would be so long I'd never finish!  IMO the best approach is to try
to take a positive approach and explain how to do things right, with
examples.  This is what I tried to do in my introductory tutorial
"Forth Application Techniques."

Cheers,
Elizabeth

--
================================================
Elizabeth D. Rather   (US & Canada)       800-55-FORTH
FORTH Inc.                                      +1 310-491-3356
5155 W. Rosecrans Ave. #1018  Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
================================================



Tue, 23 Mar 2004 02:31:40 GMT  
 my astonishingly transient Pad

.

Quote:
>I have taught introductory Forth courses for >25 years, and the list
>would be so long I'd never finish!  IMO the best approach is to try
>to take a positive approach and explain how to do things right, with
>examples.  This is what I tried to do in my introductory tutorial
>"Forth Application Techniques."

All well and good, Elizabeth, but for the newbie, "Starting Forth" and
"Thinking Forth" are beyond classic status, especially if upgraded to
ansForth. Too bad the economics are against  publishing them as books, but
would a PDF iNet version be possible?  So many newbies looking for
information, but no place for them to go.

Walter Rottenkolber

P.S. I have both your books and they are excellent references for ansForth
(actually, they are the only references).



Tue, 23 Mar 2004 13:08:40 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Transient vs. Non-Transient CONTEXT

2. [Fwd: tutorial-let on transient windows]

3. Transient BASE change

4. Krenz transient logger + Labview, how?

5. Acquiring transient signals

6. New 200 MS/s 8-bit A/D transient recorder / oscilloscope board

7. RCR: Transient instance variables

8. Small transient pulse simulation

9. Q: v'log-XL save only final value in multivalue transient

10. HELP: Resident vs. transient code in a TSR

11. browsing a transient data queue

12. serialization transient

 

 
Powered by phpBB® Forum Software