| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
| Cc: | Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: sparse (static analyzer) report |
| Date: | 2005-01-15 20:45:12 |
| Message-ID: | 11395.1105821912@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> Greg Stark <gsstark(at)mit(dot)edu> wrote:
>> What I miss most in both C and Java is the lispish ability to write
>> expressions like:
>>
>> foo = bar() || baz() || qux();
> Are you sure that C doesn't guarenty short circuit evaluation?
> I don't have my C reference handy, but my memory is that evaluation
> will stop after the first function call that returns true in the
> above expression.
Yeah, but you can only find out the boolean result, not the actually
returned value --- that is, foo will get 1 or 0.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2005-01-15 20:46:44 | Re: FATAL: catalog is missing 1 attribute(s) for relid 16396 |
| Previous Message | Bruno Wolff III | 2005-01-15 20:38:08 | Re: sparse (static analyzer) report |