Array keyword probably not necessary ?!



Hello,

The array keyword is probably not necessary and can be omitted:

var
a : [1..10] of integer;

// or
a : array[1..10] of [1..10] of [1..100] of [1..1000] of integer;

// or simply:
a : [1..10] of [1..10] of [1..100] of [1..1000] of integer;

At least for static arrays.

And for dynamic arrays it could look like:

a : [..] of integer;

Or simply:

a : [] of integer;

Kinda funny.

Bye,
Skybuck.



.



Relevant Pages

  • Re: Yet Another Newbie Question
    ... client-side script support is not a viable option as that feature can ... Arrays in ECMAScript implementations are of dynamic length by nature. ... var e_cart_descr; ... Even if the declarations above were omitted, that does not make sense as ...
    (comp.lang.javascript)
  • Re: Avoiding EVAL
    ... var rng = 'mun' ... So, of you want to abstract over your arrays, i.e., have a variable ...
    (comp.lang.javascript)
  • Re: javascript variables public or private?
    ... I am building arrays in JS and the arrays are inside a function. ... var pNodes = oLoadedXML.getElementsByTagName, ... pNode, cNode, cNodes, ... You could also add methods to the MenuData object to get and set internal properties to hold the data. ...
    (comp.lang.javascript)
  • Re: looping through array of associative arrays
    ... I'm trying to output the contents of an array of associative arrays in ... var games = new Array; ... "Associative arrays" in Javascript are actually just Objects ... var myObject = new Object; is technically the same as: ...
    (comp.lang.javascript)
  • Re: arrays by reference revisited?
    ... var B = A.concat; ... anything passed by reference (e.g. objects, arrays, functions) will have a referenced passed. ... if ('number' == typeof x) return x; ...
    (comp.lang.javascript)