Hi Ingo, > What you described as a pointer to a 2x3 array of immutable pointers > to strings might be > char **const (*gbrs_evil)[2][3] > But as i said, it is evil, so maybe i'm wrong, too.
It's really not that evil. char **const (*gbrs_evil)[2][3] gbrs_evil is a gbrs_evil pointer to * array of 2 [2] array of 3 [3] const const pointer to * pointer to * char char > that "char const = const char" is *not* what is causing the real > difficulty here, but merely a minor, trivial curiosity near the > sideline. I think those struggling with Andersons' `right left' rule, or equivalent, will probably find that const being allowed to shift position but not meaning is significant compared to those of us that have `got it'. If unary minus could come before or after in arithmetic, I think it would also trouble. `-3+-1+-4' → `-3+1-+4-'. > char *const *my_evil[2][3]; > What is sizeof(my_evil), sizeof(*my_evil), The size of the six elements, and the size of three of them. > sizeof(gbrs_evil), and sizeof(*gbrs_evil)? The size of a pointer to that array's elements, and the size of six elements. > That particular syntax possibly isn't K&R&T's most outstanding > achievement... No, though Ken did make it logical, it's just understanding the logic! :-) When he was one of Go's three authors, they made declarations read left to right. var foo *[2][3]**byte -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy