Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!bingvaxu!leah!itsgw!steinmetz!uunet!nuchat!sugar!peter From: peter@sugar.UUCP Newsgroups: comp.lang.c Subject: Re: Structure constants Message-ID: <853@sugar.UUCP> Date: Sat, 3-Oct-87 10:02:13 EDT Article-I.D.: sugar.853 Posted: Sat Oct 3 10:02:13 1987 Date-Received: Sun, 4-Oct-87 07:09:50 EDT References: <843@usfvax2.UUCP> <8677@utzoo.UUCP> Organization: Sugar Land UNIX - Houston, TX Lines: 34 Summary: pointer to array of two floats. In article <8677@utzoo.UUCP>, henry@utzoo.UUCP (Henry Spencer) writes: > > b = add_complex(a, (COMPLEX){1.0, 1.0} ); > > What is the type of the second argument if you omit the cast? Pointer to array of two floats. Just use the arithmetic combination rules as if "," was an operator. Since you're now passing an array to a function he whole thing would be converted to a pointer. In this case it might be more appropriate to make them doubles... so you cast (I didn't see the original message, but I'm assuming you're using: typedef struct { double real, imag; } COMPLEX; or something morally equivalent). I implemented this in small-C for the 8080. Was a snap. I also implemented a bunch of other BCPLoid stuff. For example, you could do: A = { int i; for(i = 0; i < ac; i++) if(av[i]=="all") break; return i; }; Well, the rest will have to wait. My baby has just done something unspeakable and I have to go clean it up. -- -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter -- Disclaimer: These U aren't mere opinions... these are *values*.