gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] x and y words exposed


From: Anton Ertl
Subject: Re: [gforth] x and y words exposed
Date: Wed, 13 Feb 2019 10:40:01 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Feb 12, 2019 at 11:26:22AM -0700, David Smith wrote:
> I have had a similar experience with the word g. Yesterday I meant g to be
> a certain function I was graphing, but I had not yet implemented it when I
> ran the program. It was quite a surprise to see VI opened and displaying
> Gforth source files. Apparently g is a text editing command.

Yes, G N B L are words for inspecting source code (or documentation)
that are modeled on the same-named SwiftForth words.  The idea is that
you use these words a lot, and therefore they have single-letter
names.  I find that I use N and B often enough that it is an issue.
For L and G, not so much.

I cannot comment on X and Y.

In any case, in Forth redefinition is only a problem if you later load
code that refers to the shadowed words.  The redefinition does not
affect code that has been defined earlier (unless it is using EVALUATE
or somesuch to access these words).

So if you redefine G, that just means that someone who wants to edit
your code by typing G will not get what they want, but the code should
run fine.

- anton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]