C* problem with structures

Michael C. Neuman mcn at lanl.gov
Sat Dec 22 14:13:47 AEST 1990


I have the following set of code which just refuses to compile under
'ncs' for the Connection Machine:

[...]
typedef struct {double hlong,hlat,hrad;} polar;
typedef struct {double x,y,z;} cart;

cart polarconv(what)

polar what;

{
[...]


  It gives me a syntax error on the line "cart polarconv(what)". Also,
this same code compiles just fine using 'cc' on a Sun. WHY? :-)

  Also, the compiler doesn't seem to like code like this:

#define RADDEG 57.29

[...]
double x;

x=cos(180/RADDEG); /* math.h included */
[...]

  Can anyone tell me what I'm doing wrong? Thanks!


-- 
*******************************************************************************
*  Mike Neuman  *  "Well, I dunno, but I guess the Cray will have to suffice."*
*  mcn at lanl.gov *   - When one can't run a program on a Connection Machine    *
*******************************************************************************



More information about the Comp.lang.c mailing list