Le mardi 10 mai 2016 à 01:56 -0700, Davide Lasagna a écrit : > Hi, > > I have a custom type representing a bordered matrix (a big square > matrix, bordered by two vectors and a scalar in the bottom right > corner), where the four blocks are stored in separated chunks of > memory. I would like to call the fields of my type using subscripts > \_1\_1, \_1\_2, ... so that I can nicely access them as A.11, A.12, > ... However, it seems that subscripts (and superscripts) with digits > can't be used for variable names, resulting in a syntax error. > Subscripts with letters work fine. > > Any thoughts on this? All identifiers must start with a letter. So you could call them A.c₁₁ or A.c11, etc.
Maybe this rule could be loosened a bit, since subscripts are never parsed as actual numbers. OTOH, I'm not sure using subscripts is really better than using standard digits with a letter prefix. Regards