in reply to What difference do the brackets make?

I see no brackets. My assembler teacher does this too, and it's such a big deal

[ ] Brackets
{ } Braces
( ) Parenthesis

See in perl, [ 1, 2 ] is an array reference, and  { 1, 2} is a hash reference, and  ( ) are neither.

BTW - i'm sure you're aware by now that `perldoc perlop' discusses operators & precedence.

Vocabulary is important, even though everybody can see that you have no brackets in your question, but what will happen when you're talking to somebody on the phone, and you say brackets, and they say What?!??? ;)


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: (vocabulary is important) Re: What difference do the brackets make?
by BrowserUk (Patriarch) on Dec 11, 2002 at 20:07 UTC

    Your absolutely right sauoq ref: Oxford University

    [ ] Square brackets
    { } Braces or Curly brackets
    ( ) Brackets or round brackets
    < > Angle brackets

    Purely practical. Try describing this expression down the telephone to someone having to say "left parethesis" and "right parenthesis" every time.

    (((a + b) *((c+d)*e))**(f/(1/2)))


    Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
    Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
    Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
    Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

      No need for parenthesis to describe that expression. Just say:

      a plus b pause times pause c plus d pause times pause e pause all of it to the power of 2 f.

      Alternatively:

      The product of the sum of a and b, the sum of c and d, and of e, and that to the power 2 times f.

      ;-)

      Abigail

        Again, this time without your lips moving! :)


        Okay you lot, get your wings on the left, halos on the right. It's one size fits all, and "No!", you can't have a different color.
        Pick up your cloud down the end and "Yes" if you get allocated a grey one they are a bit damp under foot, but someone has to get them.
        Get used to the wings fast cos its an 8 hour day...unless the Govenor calls for a cyclone or hurricane, in which case 16 hour shifts are mandatory.
        Just be grateful that you arrived just as the tornado season finished. Them buggers are real work.

Re: (vocabulary is important) Re: What difference do the brackets make?
by sauoq (Abbot) on Dec 11, 2002 at 19:02 UTC

    I think "brackets" means "parantheses" in the UK. This is a global community afterall.

    -sauoq
    "My two cents aren't worth a dime.";