Mixing ANSI and K & R 1 code.

karron at KARRON.MED.NYU.EDU karron at KARRON.MED.NYU.EDU
Wed Nov 14 19:36:42 AEST 1990


I am working on modifying a software package written to run in the older
SGI compiler environment. I have just had LOTS of problems that I have finally
nailed down to mixing old and new argument styles.

Seems you can't have newstyle argument lists (ANSI) receiving parameters
from old styles,non prototyped code.

I first tried to write all my new stuff in ANSI code, but it would
always get float (Coord) arguments wrong. Finally, I had to recode my
new subroutines in old C style arguments.

ANSI C:void MyNewSubroutine(Coord x,Coord y,Coord z)
{ do da, do that thing }

K & R 1: void TheOldWayToAvoid(x,y,z)
Coord x,y,z;
{ do da, do that thing }


It seems a bit much to be forced to 1)rewrite ALL the old code in ANSI
style headers or
2) Write new stuff with old style headers.

This is something that should be fixed. There is a lot of code out there that
needs work, and I should not have to write new stuff in old style c.

dan.

+-----------------------------------------------------------------------------+
| karron at nyu.edu (mail alias that will always find me)                        |
|                                         Dan Karron                          |
| . . . . . . . . . . . . . .             New York University Medical Center  |
| 560 First Avenue           \ \    Pager <1> (212) 397 9330                  |
| New York, New York 10016    \**\        <2> 10896   <3> <your-number-here>  |
| (212) 340 5210               \**\__________________________________________ |
| Please Note : Soon to move to dan at karron.med.nyu.edu 128.122.135.3  (Nov 1 )|
+-----------------------------------------------------------------------------+



More information about the Comp.sys.sgi mailing list