Re: Constant array of strings



Thanks for the quick reply. The low() and high() should be used, you're
right about that. But the declaration of the constant is still not correct..
do you - or anyone else:-) - know how to get that fixed?

"Marco van de Voort" <marcov@xxxxxxxx> wrote in message
news:slrnd5nce4.2iev.marcov@xxxxxxxxxxxxxxxxxx
> On 2005-04-12, Shiva <shiva087@xxxxxxxxxxx> wrote:
>
> > const
> > test = ('index1', 'index2');
>
> test : array[1..2] of string = ('index1','index2');
>
> > var
> > i: integer;
> >
> > begin
> > for i := 1 to SizeOf(test) do
> > writeln(test[i]);
> > end.
>
> for i:= low(test) to high(test) do
> ...
>


.



Relevant Pages

  • const or readonly
    ... can someone please enlighten me on the difference between a "const" and a ... "readonly" declaration? ... TIA, ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Compress captured videoframe
    ... > In MSDN I found: ... You have the declaration of ICM_USER, you want the declaration of DRV_USER: ... Const ICM_USER As Long = DRV_USER ... Prev by Date: ...
    (microsoft.public.vb.winapi.graphics)
  • Convert from Delphi to C#
    ... Mel ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Point in Poly formula
    ... Here is a near pseudo code version of the C code: ... function PointInPolygon(const Px,Py:TFloat; const ... Prev by Date: ...
    (comp.graphics.algorithms)
  • Re: Why does an alert statement alter the way that JS works ?
    ... var a = ... var thing = "foo" ... At the point when the setTimeout actually fires the browser takes the string and executes it in the global context. ... In the second example we have a function declaration, the 'doStuff' identifier is added the local scope pretty much the same as anything else that is var'd in the function and contains a function type. ...
    (microsoft.public.scripting.jscript)

Loading