Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-04

bug report in snapshot fpc-2.1.3-20070411-i386-macosx.dmg

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Imperial College

I defined the type matriceE as :

type
   vecteurF = array of extended;
   matriceF = array of vecteurF;
   matriceE = record
     err     :integer;
     x       :matriceF;
   end;

If I define a function such as :

function invM(A:matriceE):matriceE;

and when I call it such as :

invA := invM(A);

the matrix invA.x has zero dimension

If now, I replace this function by a procedure such as :

procedure invM2(A:matriceE;var B matriceE);

the call invM2(A,invA) produces a matrix invA.x of correct dimension.

I add that the function invM runs OK under Delphi 6.0.

Jean-Marie Cornuet

Reply by email

Jonas Maebe
to Imperial College
Imperial College wrote 15 lines
If I define a function such as : function invM(A:matriceE):matriceE; and when I call it such as : invA := invM(A); the matrix invA.x has zero dimension If now, I replace this function by a procedure such as : procedure invM2(A:matriceE;var B matriceE); the call invM2(A,invA) produces a matrix invA.x of correct dimension.

Please submit a compilable sample which demonstrates the problem as a bug report at
http://www.freepascal.org/mantis

Jonas

Reply by email