Trouble reading syntaxes


the format writing array types discussed in "12.1 arrays" article:

(i going add link, how verify account?)

array-type:
non-array-type   rank-specifiers
non-array-type:
type
rank-specifiers:
rank-specifier
rank-specifiers   rank-specifier
rank-specifier:
[   dim-separators<sub>opt   </sub>]
dim-separators:
,
dim-separators   ,

i don't understand @ all! 2 lines in rank-specifiers mean? mean can written "rank-specifier" or "rank-specifier  rank-specifier", or both together? what dim-separators(opt) , what on earth last part mean?

same this:

array-creation-expression:

new   non-array-type   [   expression-list   ]   rank-specifiers<sub>opt   </sub>array-initializer<sub>opt</sub>

new   array-type   array-initializer

what "rank-specifiers<sub>opt   </sub>array-initializer<sub>opt" mean?</sub>


let's @ initializers in more detail:

variable-initializer-list:
    variable-initializer
    variable-initializer-list , variable-initializer

ok, recursively defined list, list of "variable-initializer" separated commas.

variable-initializer:
    expression
    array-initializer

and variable initializer can either

  • an expression , means lot of stuff, not number (for example expression can be 2 or 42 * x or "abc".length / 3)
  • an array-initializer - yes, that's used multidimensional arrays

as non-array-type - means that, type that's not array. doesn't mean "fundamental types" enumerated other struct/class/enum/delegate/interface type.

this non-array-type seems bit fishy though. suspect have been possible define array types bit simpler:

array-type: type rank-specifier

by not restricting ourselves non array types eliminate need list of rank specifiers.



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user