opensubscriber
   Find in this group all groups
 
Unknown more information…

r : rebolist@rebol.com 3 December 2010 • 4:37AM -0500

[REBOL] Re: Confused about "word" forms
by Izkata

REPLY TO AUTHOR
 
REPLY TO GROUP




On Thu, Dec 2, 2010 at 2:03 PM, Duke Normandin <dukeofperl@ml1....> wrote:

>
> On Fri, 3 Dec 2010, Graham Chiu wrote:
>
> >
> > On Fri, Dec 3, 2010 at 8:24 AM, Duke Normandin <dukeofperl@ml1....>
> wrote:
> > >
> > > So what's the diff between using "age" by itself, and ":age" to scoop
> > > the value?
> > >
> > > --
> > > Duke
> >
> > Try that with a function.
>
> OK! I guess only :age will work in a function :)
>
> age and :age will both work at the core prompt.
>
>
Not in a function, on a function - for example:

>> age: func [][print "I am 22" return 0]

Using just age will evaluate the function:
>> age
I am 22
== 0

Using the get-word :age appears to do nothing, but that's because it
retrieved the function instead of evaluated it:
>> :age
>> probe age
I am 22
0
== 0
>> probe :age
func [][print "I am 22" return 0]

It appears to do nothing different when using word!s as variables for
integers, strings, etc, because in those cases, evaluating it just retrieves
it.

--
<*>


--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.


Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.