Re: Records that could be arrays



On 2006-02-23, Jean-Pierre Rosen <rosen@xxxxxxxxx> wrote:

I beg to disagree here. Arrays are for *iterative* structures, if
you don't have a for loop over an array, it should be a record.

In most cases you don't know at the time you code the type whether
you'll use a loop; and records offer no advantages either way. While
limitations can be quite useful when they apply to visibility or
access, I see no advantage to limiting the expressive power that
arrays have.

The fact that all components are of the same type may be an accident
that changes during program evolution.

Good point.

--
PM instructions: do a C4esar Ciph3r on my address; retain punctuation.
.



Relevant Pages

  • Re: Whats the best language to learn...
    ... over the arrays of vertices, ... loop over the selected models; ... recently my edge construction and shadow-volume rendering code ... but enums just make it easier and quicker to make ...
    (comp.programming)
  • Re: GNAT compiler switches and optimization
    ... allocating and freeing arrays, the the effects ... But I imagined allocation is just what is happening all the time ... type LIST is array of BOOLEAN; ... 2000 loop ...
    (comp.lang.ada)
  • Re: Non-rectangular 3D plot
    ... Ok I see where my code would get very confusing now. ... I originally had it accepting arrays for my inputs, ... I have shown my new code below without x and y in the for loop. ... to have y increment over a counter j for a given x value. ...
    (comp.soft-sys.matlab)
  • Re: Array bounds checking
    ... is the bounds-checking performed in bytecode, ... A native compiler will remove the checks when it ... loops and do not change the loop variable anywhere inside the loop ... but for integer arrays it should be a killer. ...
    (comp.lang.java.programmer)
  • HHow can we Speed Up This Wend/While Loop
    ... I need some assistance to speed up a while / wend loop which I have ... The purpose of the loop is to populate two single dimension ... The recordset is made up of two columns, ... The two arrays on the other hand are called strLabel and curData, ...
    (comp.lang.basic.visual.misc)