public static int CountArrayDimensions(Symbol s)
{
if (s.Name.Length >= 3 && s.Name.StartsWith("#[") && s.Name[s.Name.Length-1] == ']') {
for (int i = 2; i < s.Name.Length-1; i++)
if (s.Name[i] != ',')
return 0;
return s.Name.Length-2;
}
return 0;
}
/// <summary>Gets the Symbol for an array with the specified number of