programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: SWOOP Question

From: Rick VanNorman <rick_at_forth.com>
Date: Mon, 17 Dec 2001 09:49:04 -0800

Gene,

>
>Actually, I can get the CREATE DOES> part to work but it's ugly:
>
> COMMON : add CREATE , DOES> ... COMMON ;

The problem only starts there. The context of creating
a class definition is much more complicated; each class
definition is not a normal "CREATE" kind of thing, but has
fields indicating what to do and how to behave and how
it is to be referenced. If you want to see the details,
examine the Swoop source code... I don't think your solution
is general or correct, but it would take more time than
I have to spare to prove it.

>But no way can I redefine :. Looking at the source it seems to me
>that using common ought to work also, but something goes wrong.

Again, look at the source code as how : is defined in the
Swoop context.

>Is POSTPONE allowed within a CLASS? Or to put it differently I want
>compile a word that runs the compile time code of a member.
>

Postpone can already be used in a class, so long as it doesn't
reference a class word. The questions that have to be asked
in order to have it run would be (starting with) what is the
current context in which the POSTPONE is to be resolved? What
class is active? Are you defining a new class? Are you simply
referencing the word containing the POSTPONE interactively?
Is the word containing it being called?

My experience in wanting this was that I gave up and found
other ways to do it.

Sorry the news isn't better.

Rick

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Mon Dec 17 2001 - 09:45:51 PST

This archive was generated by hypermail 2.2.0 : Sat Nov 22 2008 - 03:04:20 PST