To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 377
376  |  378
Subject: 
Forth question
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Wed, 24 May 2000 01:53:17 GMT
Reply-To: 
SJM@JUDGEMENTnospam.COM
Viewed: 
1443 times
  
I'm trying to define a constant in a compiled word.

: zzz 1 CONSTANT ONE ;

I know its not right. It tries to compile "ONE" which is not
what is wanted. What is the right way to say this?



Message has 1 Reply:
  RE: Forth question
 
(...) 1 CONSTANT ONE Recall that CONSTANT is a *defining* word, just like the ":" It makes a name in the dictionary, in this case "ONE" and then links to a special bit of code that is executed every time ONE is interpreted. It grabs the value out of (...) (25 years ago, 24-May-00, to lugnet.robotics.rcx.pbforth)

9 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR