[fpc-pascal]case .. with strings.
jordi
jovy at wanadoo.es
Wed Feb 20 17:41:52 CET 2002
Michael Van Canneyt wrote:
> Case with strings is not supported, and probably will never be
> supported. One way of doing the above is to
>
> const
> N = 3;
> names : Array [1..N] string [10] = ('abcdeefdre','gfsgeyeyey','jfmvnvyret');
>
> Var
> I,Which : Integer;
>
> begin
> I:=1;
> Which:=0;
> While (Which=0) and (I<=N) do
> If Names[I]=ParamStr(1) then
> Which:=I
> else
> Inc(I);
> Case Which of
> 1 : ;
> 2 : ;
> 3 : ;
> else
> // Zero, invalid option.
> end
Thanks.
--
Salutacions.
Jordi.
http://galeon.com/jovy215639/
mailto:jovy at wanadoo.es
More information about the fpc-pascal
mailing list