[fpc-pascal]case .. with strings.
    jordi 
    jovy at wanadoo.es
       
    Wed Feb 20 06:01:48 CET 2002
    
    
  
Hi, can someone help me?
for example, if I have some constants :
const
  name_1 : string [10] = 'abcdeefdre';
  name_2 : string [10] = 'gfsgeyeyey';
  name_3 : string [10] = 'jfmvnvyret';
etc...
Begin
  if paramstr (1) = name_1 then .....;
  if paramstr (1) = name_2 then ......;
  if paramstr (1) = name_3 then ......;
etc...
Is there another way to evaluate this constant strings?
like : case paramstr (1) of
             name_1 : ...;
             name_2 : ....;
             name_3 : .....;
           end;
the if sentence is very clear but if I have a lot of const values
the program looks a little "stupid".
Sorry for my poor english
--
Salutacions.
Jordi.
http://galeon.com/jovy215639/
mailto:jovy at wanadoo.es
    
    
More information about the fpc-pascal
mailing list