Re: my C pgm

Поиск
Список
Период
Сортировка
От
Тема Re: my C pgm
Дата
Msg-id Pine.LNX.4.30.0011232254420.2575-100000@chapelperilous.net
обсуждение исходный текст
Ответ на my C pgm  (Lisa Reilman <lr425@stl.rural.usda.gov>)
Список 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??


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Backward Compatibility
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: RE: [HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions