Oberon Community Platform Forum
November 23, 2017, 09:47:22 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: Compiler can't catch min max size errors for Mathematical array types  (Read 2183 times)
fnecati
Jr. Member
**
Posts: 60


« on: March 09, 2010, 01:26:03 PM »

 
The following module compiles and produces exe.
But it is wrong; there are some undefined variables, AA, BB... of Mathematical extension types.

regards,


Zonnon Compiler, Version 1.2.6.7, Monday, January 18, 2010, 10:23:28 PM
(c) 2003-2009 ETH Zurich

Code:

module errorminmax;

type
    Matrix = array {math} *,* of real;

var
    mm : Matrix;

begin
mm := [[1.0, 2.0],[3.0, 4.0]];
writeln("Minimum of mm=", min(mm));
writeln("Maximum of mm=", max(mm));

writeln("Maximum of mm=", max(mn)); (* => Compiler can not find this error: mn is not defined*)
writeln("Minimum of AA=", min(AA)); (* => Compiler can not find this error: AA is not defined*)
writeln("Maximum of BB=", max(BB)); (* => Compiler can not find this error: BB is not defined*) *)
(* similarly, size function has the same problem *)
end errorminmax.
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!