[REBOL] Re: [Truth test fails]

2004-05-19 Thread Christian Ensel

Hi Tim,

| What would be the use for that feature?
|

It's usefull e.g. when you MOLD or SAVE what you want to LOAD easily:

>> mold none
== "none"
>> mold/all none
== "#[none]"
>> type? load mold none
== word!
>> type? load mold/all none
== none!

>> save/all %/c/test.r none
>> load %/c/test.r
== none
>> type? load %/c/test.r
== none!

The same feature applies for objects, too:

>> mold/all context [a: 5]
== {
#[object! [
a: 5
]]}
>> type? load mold context [a: 5]
== block!
>> type? load mold/all context [a: 5]
== object!

HTH,

Christian
-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [Truth test fails]

2004-05-19 Thread Carl Read

>* Cyphre <[EMAIL PROTECTED]> [040519 02:18]:
>> 
>> Hi Tim,
>> 
>> just little notice...sometimes it is useful to know also this this kind of
>> syntax(although in your case it is better to use get IMO)
>> 
>> >> a: [false #[false]]
>> == [false false]
>> >> type? a/1
>> == word!
>> >> type? a/2
>> == logic!
>> >>
> 
>  I'll be darned. I didn't realize that one could
>  do that.

It's only in the beta versions, not in 1.2.1.

> What would be the use for that feature?

Saves the need for a compose, I guess...

a: compose [false (false)]

-- Carl

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [Truth test fails]

2004-05-19 Thread Tim Johnson

* Cyphre <[EMAIL PROTECTED]> [040519 02:18]:
> 
> Hi Tim,
> 
> just little notice...sometimes it is useful to know also this this kind of
> syntax(although in your case it is better to use get IMO)
> 
> >> a: [false #[false]]
> == [false false]
> >> type? a/1
> == word!
> >> type? a/2
> == logic!
> >>
 
  I'll be darned. I didn't realize that one could
  do that. What would be the use for that feature?
  Thanks
  tim

> regards,
> 
> Cyphre
> 
> 
> - Original Message - 
> From: "Tim Johnson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 19, 2004 1:12 AM
> Subject: [REBOL] Re: [Truth test fails]
> 
> 
> >
> > * Ladislav Me??í?? <[EMAIL PROTECTED]> [040518 15:01]:
> > >
> > > Tim Johnson napsal(a):
> > >
> > > >I'm seeing unexpected behavior from a truth test in a context.
> > <> >
> > > >What am I doing wrong?
> > > >
> > > >thanks
> > > >tim
> > > >
> > > >
> > > see this:
> > >
> > > set [key val]  [bold false]
> > > probe key
> > > set key val
> > > probe bold ; == false
> > > type? bold ; == word!
> >
> >   Hah! forgot to use 'get
> >   Thanks Ladislav!
> >   tim
> >
> > -- 
> > Tim Johnson <[EMAIL PROTECTED]>
> >   http://www.alaska-internet-solutions.com
> >
> > -- 
> > To unsubscribe from this list, just send an email to
> > [EMAIL PROTECTED] with unsubscribe as the subject.
> >
> >
> >
> 
> -- 
> To unsubscribe from this list, just send an email to
> [EMAIL PROTECTED] with unsubscribe as the subject.

-- 
Tim Johnson <[EMAIL PROTECTED]>
  http://www.alaska-internet-solutions.com

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [Truth test fails]

2004-05-19 Thread Cyphre

Hi Tim,

just little notice...sometimes it is useful to know also this this kind of
syntax(although in your case it is better to use get IMO)

>> a: [false #[false]]
== [false false]
>> type? a/1
== word!
>> type? a/2
== logic!
>>

regards,

Cyphre


- Original Message - 
From: "Tim Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 19, 2004 1:12 AM
Subject: [REBOL] Re: [Truth test fails]


>
> * Ladislav Me??í?? <[EMAIL PROTECTED]> [040518 15:01]:
> >
> > Tim Johnson napsal(a):
> >
> > >I'm seeing unexpected behavior from a truth test in a context.
> <> >
> > >What am I doing wrong?
> > >
> > >thanks
> > >tim
> > >
> > >
> > see this:
> >
> > set [key val]  [bold false]
> > probe key
> > set key val
> > probe bold ; == false
> > type? bold ; == word!
>
>   Hah! forgot to use 'get
>   Thanks Ladislav!
>   tim
>
> -- 
> Tim Johnson <[EMAIL PROTECTED]>
>   http://www.alaska-internet-solutions.com
>
> -- 
> To unsubscribe from this list, just send an email to
> [EMAIL PROTECTED] with unsubscribe as the subject.
>
>
>

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [Truth test fails]

2004-05-18 Thread Tim Johnson

* Ladislav Me??í?? <[EMAIL PROTECTED]> [040518 15:01]:
> 
> Tim Johnson napsal(a):
> 
> >I'm seeing unexpected behavior from a truth test in a context.
<> >
> >What am I doing wrong?
> >
> >thanks
> >tim
> >  
> >
> see this:
> 
> set [key val]  [bold false]
> probe key
> set key val
> probe bold ; == false
> type? bold ; == word!

  Hah! forgot to use 'get
  Thanks Ladislav!
  tim

-- 
Tim Johnson <[EMAIL PROTECTED]>
  http://www.alaska-internet-solutions.com

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [Truth test fails]

2004-05-18 Thread Ladislav Mečíř

Tim Johnson napsal(a):

>I'm seeing unexpected behavior from a truth test in a context.
>Here is the code for the context:
>writer: make object![
>keys: [bold size color family]
>bold: true
>bold-tag: ""
>bold-end-tag: ""
>fix: func[args[block!]][
>foreach [key val] args[
>?? key
>if not find keys key [
>make error! 
>reform[key "is not an acceptable key for htm-writer. Use:" keys]]
>set in self key val
>]
>?? bold
>either bold [
>print "creating tag"
>bold-tag: ""
>bold-end-tag: ""
>][
>print "no tag"
>bold-tag: ""
>bold-end-tag: ""
>]
>]
>]
>Now here is sample code execution:
>  
>
>>>writer/fix [bold false]
>>>  
>>>
>key: bold
>bold: false
>creating tag
>== ""
>I would expect that the false-block for 'either
>would be executed.
>
>What am I doing wrong?
>
>thanks
>tim
>  
>
see this:

set [key val]  [bold false]
probe key
set key val
probe bold ; == false
type? bold ; == word!

-L

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.