realbasic-nug
[Top] [All Lists]

Re: What are expressions? (ByRef)

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: What are expressions? (ByRef)
From: Norman Palardy <npalardy at great-white-software dot com>
Date: Thu, 30 Jun 2005 11:53:06 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <74E7BAE3-09DD-46EC-A8CF-0FA300ABA748 at kellerfarm dot com> <AD07E2C3-D1A7-4021-8A20-D3F5B446A3A4 at mac dot com> <2BDABF28-C41C-43E3-B5F8-CCF65D3EC8B4 at haranbanjo dot com> <EEE66340-86F2-4B35-BD23-A01BA34D13F4 at GreenRiverComputing dot com> <44E68F94-5463-4092-A68D-DAB511DD6859 at mac dot com> <F6361DE1-E6DD-4A40-9BCD-D50A51D19876 at mac dot com> <272A5BB6-9136-41FD-8D04-E95C8F323AE8 at realsoftware dot com> <4c2b930a8a65d2a9639b5a7262c01fdd at great-white-software dot com> <9322004A-7EC8-482C-91C3-E6D434B7E371 at realsoftware dot com> <558f7c3d678a869e283f0ddc379b3bf0 at great-white-software dot com> <BFB2C14D-3FAE-4B25-A1FD-C1A4F91D893E at realsoftware dot com>

On Jun 30, 2005, at 11:17 AM, Mars Saxman wrote:


On Jun 30, 2005, at 9:56 AM, Norman Palardy wrote:

is it primarily because date has a conversion to string and so both signatures match ?

I can see how that would be ambiguous

the odd thing is that it does work if you do

      "the beginning" + New Date.SQLDate() + "and the end"

so I dont understand why additional parens would make it ambiguous

It has nothing to do with conversions. All it takes is this:

foo(bar).baz

Does that mean "call foo, passing in bar, and call baz on the result", or does it mean "evaluate bar, call baz on its result, and call foo on its result?"


Hmmm ....

        evaluate bar, call foo on the result, call baz on the result of that

parens, then left to right

Just using what I would expect would be the precedence rules for such operators based on what other languages that allow such constructs would do.

If it were ambiguous this would be ambisuous in a similar way wouldn't it ? But this works just fine.

        "the beginning" + New Date.SQLDate() + "and the end"

Stefans example would not work with a few extraneous parens though

        "the beginning" + (New Date()).SQLDate() + "and the end"

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>