String Array Bug!

Wed, 11 Jun 1997 23:17:21 +0800


I found another bug (hidden feature)! Take a look at the code snippet below:

PROGRAM:

    Type
        TStr10 = String[10];
    Var
       CPUName : Array[0..5] Of TStr10 Value
                    ('Unknown','80186','80286',
                     '80386','80486','Pentium');
    Var
         CPU : Integer;
    Begin
        For CPU := 0 To 5 Do
            WriteLn('*',CPUName[CPU],'*');
    End.


OUTPUT:
    *Unknown *
    *80186 *
    *80286 *
    *80386 *
    *80486 *
    *Pentium *


For some reason, there are SPACES after CPUName! I am using GPC 970420 for
DJGPP 2.01.

Cya L8r
 ________________________
|  _)        | |             e-mail: bernie@icenet.com.au
|___)ernhard |_|schirren             ptschirrenb@cc.curtin.edu.au
                             www:    www.geocities.com/CollegePark/Quad/8070/


Bernhard Tschirren (bernie@icenet.com.au)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es