Bug report

Tue, 24 Jun 1997 14:20:00 +0200


Am 24.06.97 konnte ich meine Finger einfach nicht von der Tastatur
fernhalten... Folgendes kam dabei heraus:
Hallo Gpc!

Look at the source:

program Bug;
type tvect=record
                x,y,z:real;
             end;
operator + (a,b:tVect) r:tVect;
begin
  r.x:=a.x+b.x;
  r.y:=a.y+b.y;
  r.z:=a.z+b.z;
end;  {BTW - here it warns "return value not assigned" - GCC relict?}

type tNotOK=array[1..5] of tvect;
(*     tIsOk=array[1..5] of record p:tvect end;*)

var a,b:tvect;
    prob:tNotOk;
    r:tvect;
begin
  r:=a+b; {works fine}
  r:=b+prob[1]; {doesn't :-(}
  a:=prob[1];r:=a+b;     {Does}
end.
Chris

---
HomeBox : Chateau  - +49(0)8677 911940(V.34)  911941(ISDN)
*! New Address - C.Wendt@chateau.line.org !*

## CrossPoint v3.11 ##


Christian Wendt (C.WENDT@CHATEAU.line.org (Christian Wendt))

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