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

Re: use of :: (Re: Setting background color)

From: Bob Nash <BNash_at_smud.org>
Date: Wed, 5 Sep 2001 10:16:26 -0700

I am thinking of re-defining "::", per Mike's example, at the start of
programs that will be compiled only with later versions of SF (i.e.,
2.2.2.9). Is this a good idea?

If so, I assume that I must also ensure that I am in the Forth vocabulary
when it is executed. Of course, this is generally true at the start of a
program with no other re-definitions of ":", but ...

Is there a more general purpose definition that ensures the correct
vocabulary (or other tricky stuff) or is the suggested code adequate for
this purpose?

-----Original Message-----
From: Rick VanNorman [mailto:rick_at_neverslow.com]
Sent: Thursday, August 30, 2001 10:34 PM
To: sftalk_at_forth.com
Subject: [sftalk] Re: use of :: (Re: Setting background color)

Mike,

There is no reason I can think of not to define it thusly.
I actually believe, in hindsight, that all references to
api calls in SwiftForth should be preceeded by the ::
operator, as doing so would make the search order code
much simpler. If it were done this way, the :: would
look up and compile the reference to the next word.
However, legacy probably demands that this not be imposed
on the user community. Just my $0.02 .

Rick

*********** REPLY SEPARATOR ***********

On 8/30/2001 at 8:13 AM Mike Ghan wrote:

>:: is required before calling any Windows function (ie
>SelectObject) but only for methods in a class such as in
>Richard's example below. A normal definition does not require ::
>and in fact the use of :: causes unexpected results (I've found
>this the hard way - more than once).
>
>Rick, would there be any harm in defining :: in the FORTH
>vocabulary as
>
>: :: ; IMMEDIATE
>
a

----------------------------------------------------------------------
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.
----------------------------------------------------------------------
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 Wed Sep 05 2001 - 10:16:25 PDT

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