A. First, go to the variable name, "next", and note that it is directly enclosed by parentheses.
B1. So we group it with what else is in the parentheses, to get "next is a pointer to...".
B. Then we go outside the parentheses, and have a choice of a prefix asterisk, or a postfix pair of parentheses.
B2. Rule B.2 tells us the highest precedence thing is the function parentheses at the right, so we have "next is a pointer to a function returning…"
B3. Then process the prefix "*" to get "pointer to".
C. Finally, take the "char * const", as a constant pointer to a character.
博客围绕Go语言中变量声明展开解析。先关注变量名‘next’,其被括号包围,将其与括号内内容组合。接着分析括号外,依据规则确定函数括号优先级最高,得出‘next是指向返回…的函数的指针’,最后处理‘char * const’为指向字符的常量指针。

2231

被折叠的 条评论
为什么被折叠?



