Question: How do I get CodeGeneration to use struct variables in my C code

Hi everyone,

I would like to use structs

    struct sname {
        smem1;
        smem2;
    }

in my C code defined elsewhere. How do I get CodeGeneration to produce variable names like

    sname.smem1

?

The appoach to use the respective maple data type

  sname := Record('smem1', 'smem2'):
  CodeGeneration[C](sname);

results in

    Warning, procedure/module options ignored
    double smem1;
    double smem2;

and the appoach to define it as name

    CodeGeneration[C](`sname.smem1`);

results in

    Warning, the following variable name replacements were made: sname.smem1 -> cg0
    cg = cg0;

Your answer is appreciated

Fabian

Please Wait...