On Mon, Jun 02, 2003 at 02:05:01PM +0200, Frank Heckenbach wrote:
Adriaan van Os wrote:
What I don't like is that another identifier is introduced within some other declarations. Enum types do the same, and this has caused some extra work in the compiler. Since it's possible to get the upper bound as `High (s)' or `High (a)' (BP compatible feature), I think it's not necessary to introduce a new identifier in the declaration.
The constant identifier could be optional:
var s: String ( const ) = 'Hi'; a: array [1 .. const ] of Integer = (42, 17, 99);
Sorry, but this is exactly the opposite. This way, we'd not only have the complexities of handling the identifier (in case it's there), but also two syntactic variations. So this in example of an unwarranted extension IMHO. One way seems useful, two ways are redundant. And the extension should be kept as simple as possible (i.e., *no* additional identiffier, since it's alread possible to declare it with existing features).
Besides, using `const' as a placeholder looks quite strange. To me, it would suggest something like the variable is constant, not the upper bound is omitted.
What about this one? It doesn't involve any identifiers, it clearly suggests a "missing information", and unlike "...", the usage of the symbol is consistent (i.e., it always stands for "number", not ".. number" depending on context).
var s: String (?) = 'Hi'; a: array [1 .. ?] of Integer = (42, 17, 99);
Emil
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707