Yeah you are right I am working on Firefox Debian . You seem to be genious.
On Feb 17, 5:42 pm, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > Hey Pankaj, > > Pankaj a écrit : > > > num = num [[ $F('refid'); > > > What is that actually ? > > Is it a bracket or the OR ? > > OMG, don't you even have a font that lets you distinguish between [[ and > ||? How can you possibly work? > > Aside from this, I don't know of a single language that features a [[ > operator... If you find [[, it's usually because you're opening two > levels of array literals... which you'd obviously close later on. > > You seem to be reading your email through Firefox on Debian (1.0.4, too. > Upgrade, man!). Hitting Ctrl+Plus a few times should resolve the > ambiguity when you're in doubt on characters. > > It's a double pipe (||), not a double opening bracket. It's a logical > OR operator. It's a common Prototype idiom: > > a = a || defaultValue; > > If a is undefined then (as would a parameter that got no argument when > the function was called), in the context of "a || defaultValue", a will > be boolean-equivalent to false, thus triggering evaluation of the > right-hand operand: defaultValue. And a will use that default value. > > But if a is not undefined, unless its current value is > boolean-equivalent to false (as would be zero, for instance), its > current value will remain used, and the right-hand operand will be ignored. > > I hope you get it now... > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---