($0)-:a:
0
#($0)-:(>a:)
1
''-:''
1
''-:0{a.
0
2007/4/6, Henry Rich <[EMAIL PROTECTED]>:
It's because the rank of = is 0.
If you understand why (0$0) + (0$0)
produces an empty result, you can use the same
reasoning to explain (0$0) = (0$0) .
Similarly,
1 1 = 1 1
1 1
You are performing a comparison between atoms.
To compare two entire operands for equality, use -:
which has infinite rank.
Henry Rich
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Harms
> Sent: Thursday, April 05, 2007 11:24 PM
> To: [email protected]
> Subject: [Jgeneral] null comparison
>
> I recognize (from experimentation) that testing
> equality between two null values results in a null
> value.
>
> ($0)=>a:
>
> #($0)=(>a:)
> 0
> ''=''
>
> ''=0{a.
>
>
> What I have not found is documentation of that fact,
> nor explanations of the design choices that led this
> to be the case.
>
> Tracy Harms
>
>
>
> ______________________________________________________________
> ______________________
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> ----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
801 Grímsnes ,t-póst: [EMAIL PROTECTED]
Skype: gosiminn, gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
http://groups.google.com/group/J-Programming
Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
góður kennari getur stigið á tær án þess að glansinn fari af skónum
/|_ .-----------------------------------.
,' .\ / | Með léttri lund verður |
,--' _,' | Dagurinn í dag |
/ / | Enn betri en gærdagurinn |
( -. | `-----------------------------------'
| ) | (\_ _/)
(`-. '--.) (='.'=)
`. )----' (")_(")
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm