Re: Array assignment

From: Brian Clausing (clausing_at_voyager.net)
Date: 10/30/03


Date: Thu, 30 Oct 2003 00:06:45 -0500

Bruce Roberts wrote:
>
> "Nicolai Hansen" <nic@aub.dk> wrote in message
> news:d96764ff.0310290145.1d81492b@posting.google.com...
>
> > The sad part is that you can not do
> >
> > arr: array of integer = (10, 10, 0, -50);
> >
> > ie a dynamic array of integers, initialised with 4 default members...
> > there's as far as I see it no technical reason for this to be impossible
> :/
>
> I suspect that this is by-design. Inherent in the desire for dynamic array
> constants is an admission that one wants to create a constant with
> absolutely no idea of its values. This is not a comforting thought. Good
> design, ISTM, dictates that one should know exactly how many elements are
> required in a constant array before actually declaring the array. In fact,
> ISTM, that "dynamic array constant" is an oxymoron.

Then varying the length of a string is bad design?

var s: string;
s := 'abcd'



Relevant Pages

  • Re: Just spent 5 hours bug fixing HLA Adventure (my heads about to roll off!)
    ... Paul chose to implement his parser with a string index function, ... Instead, he should have placed the vocabulary words in an array of strings, ... are implemented as a separate code block for each room. ... On the other hand, the movement table has the correct design approach, ...
    (alt.lang.asm)
  • Help in French|Spanish|German translation.
    ... I am also an author of User-defined string functions. ... WORDTRANEX (cSearched, cArExpressionSought | cExpressionSough, ... each string of the array is searched ... If the parameter nArStartOccurrence is -1 or omitted, the replacement starts ...
    (microsoft.public.fox.helpwanted)
  • Re: passing a string to a dll
    ... Joe, I really appreciate you taking the time to demonstrate this. ... sure how I would implement indexing it for random alphanumeric codes. ... I might handle the array. ... I actually have been wondering if I could use a second string ...
    (microsoft.public.vc.mfc)
  • Re: passing a string to a dll
    ... I might handle the array. ... I actually have been wondering if I could use a second string ... look at insertion cost, organization cost, and search cost. ...
    (microsoft.public.vc.mfc)
  • RE: Structure conversion from C++ to VB-2008?
    ... One of the most important structures is AmiVar structure. ... point number, the array of floating point numbers, a string or IDispatch ... Dim 13012679 as Integer ...
    (microsoft.public.dotnet.languages.vb)