[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 970624: Restriction of variable name in ncgen?



> Subject: Re: 970624: Restriction of variable name in ncgen?
> Glenn--
>
> It seems that the allowed "-" in variable names would cause a problem
> in c and fortran code.
> Is this situation handled differently?
>
> --Tom

You are right, it causes a problem.

netcdf test {
        variables: float theta-0;
}

produces

        ...
        /* variable ids */
        int theta-0_id;

Which can't be compiled.
"test.c", line 19: error(1065): expected a ";"
     int theta-0_id;
              ^
 ... (other errors)


Russ Rew, the author of ncgen (and thus cdl syntax solomon) is on vacation
this week. In my previous message, I was trying to rationally deduce the
reasoning behind the cdl syntax. Since we are now into the realm of channeling,
I'll have to defer further discussion of this until his return.

When/if he fixes the above problem,
perhaps he will be willing to add the '.' syntax you request.

-glenn