Oberon Community Platform Forum
December 14, 2019, 06:52:36 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: OberonMath: trap with odd increment  (Read 2916 times)
fnecati
Jr. Member
**
Posts: 60


« on: January 12, 2009, 12:09:02 PM »

Hi,

In the following module, If the increment of first index of an
2D array is odd and >=3 then then compiler traps with then latest WinAos.

One dims. array is ok., untested 3D, and nD arrays.

Is this a bug or unimplemented feature?

Regards,

-Necati

MODULE TestMatrix;

PROCEDURE CalcRMat*;
VAR a, b:  ARRAY [*,*] OF LONGREAL;
   res: LONGREAL;
   
BEGIN
NEW(a,99,99);

a := 1.0;

b := a;
b := a[0..98, 0..98];

b := a[0..98, 0..98 BY 2];

b := a[0..98 BY 2, 0..98 BY 2];

b := a[0..98 BY 2, 0..98 BY 3];

b := a[0..98 BY 3, 0..98 BY 2]; (* <-- Compiling Traps with option \s *)
b := a[0..98 BY 5, 0..98 BY 2]; (* <-- Compiling Traps with option \s *)

END CalcRMat;

BEGIN


END TestMatrix.

PC.Compile \s TestMatrix.Mod ~ (* compiling traps *)

PC.Compile \sx TestMatrix.Mod ~ (* compiles *)

TestMatrix.CalcRMat ~

SystemTools.Free TestMatrix ~
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!