I am trying to convert C macro into a template. But I am struggling to 
understand the C language code.

The macro is (defined 
[here](https://github.com/qtronic/fmusdk/blob/master/fmu20/src/models/fmuTemplate.h#L25)
 in case you need some context):
    
    
    #define  r(vr) comp->r[vr]
    
    Run

where comp is a struct of type 
[ModelInstance](https://github.com/qtronic/fmusdk/blob/master/fmu20/src/models/fmuTemplate.h#L146).

I barely remember C, but it looks like comp->r[vr] refers to component vr of 
the r array within comp struct. Am I right? But the ModelInstance definition 
doesn't seem to suggest it is an array.

Any help interpreting this please?

Reply via email to