j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
On Sep 25, 2010, at 6:00 AM, openbios-request@openbios.org wrote:
Message: 2 Date: Fri, 24 Sep 2010 09:25:28 -0400 From: Tarl Neustaedter tarl-b2@tarl.net To: The OpenBIOS Mailinglist openbios@openbios.org Subject: Re: [OpenBIOS] Help with some code Message-ID: 4C9CA6C8.2050009@tarl.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed
You should get in the habit of putting stack diagram comments on every line of code - it will help you keep track of what you are playing with. By convention, a stack diagram starting with $ indicates a addr,len string pointer, which you should use in this code for clarity.
As best I can tell without stack diagrams, you are generating strings of the form "foo: set-foo foo ! ; foo", and it's probably barfing on "foo:" . I'm not sure what this is supposed to accomplish.
What I'm trying to do is create a new word. The new word's name will be set-_variable_name_. What would be another way to create a new word inside another word?
Replace the "eval" with a "type" and you should be able to see what it's generating.
I tried your suggestion, but everything looked just fine. The problem shows up at compile-time. Using this code:
variable dog
: myword 4 -> dog ;
What the code should create at compile-time is this:
: myword 4 set-dog ;
but creates this instead
: myword 4 : set-dog ;
The problem is with the extra colon between the 4 and the set-dog word. I need a way to eliminate it from the myword word. Other times the compiler will say the word set-dog is undefined. Any clue how to fix this problem?
Attachments: