From: | <bmccoy(at)chapelperilous(dot)net> |
---|---|
To: | Lisa Reilman <lr425(at)stl(dot)rural(dot)usda(dot)gov> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: my C pgm |
Date: | 2000-11-24 04:02:51 |
Message-ID: | Pine.LNX.4.30.0011232254420.2575-100000@chapelperilous.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 16 Nov 2000, Lisa Reilman wrote:
> This program is suppose to have averagefunc that accepts 5 floating
> point numbers as arguments and return the average to two decimal places.
>
> I keep getting syntax errors on lines 6 & 26 and on line 29 is says
> unspecified a,b,c,d,e.
Not sure what this has to do with PostgreSQL, but this compiled and ran
fairly cleanly for me, after I fixed one simple thing.
> 5 float num1, num2, num3, num4, num4, num5, avg;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
No need to make these global variables outside of main. You also declared
num4 twice.
It ran fine for me then. What C compiler are you using?
Brett W. McCoy
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
CONGRATULATIONS! Now should I make thinly veiled comments about
DIGNITY, self-esteem and finding TRUE FUN in your RIGHT VENTRICLE??
From | Date | Subject | |
---|---|---|---|
Next Message | Willis, Ian (Ento, Canberra) | 2000-11-24 05:05:54 | RE: Running several postmaster using same database in p arallel |
Previous Message | Tom Lane | 2000-11-24 01:34:46 | Re: Backward Compatibility |