[sac-user] No definition found for a function "Array::max" that expects 1

shbnj at 163.com shbnj at 163.com
Tue Jun 24 17:04:20 BST 2008


Dear Sir/Madam:

I am wondering if you could help me to solve a problem I as a beginner of SAC2C user met.  

I met a compilation problem when I compiled code in "Listing 2.15: Axis Control: max" on page 22 in the SAC 1.0 tutorial. The code and error messages are as follows : 

use StdIO:all;
use Array:all;

int main()
{
    vect=[0,1,2,3];
 
   arr3d = { [i,j] -> vect[[i]]*4 + vect[[j]]*16 + vect };
    print (arr3d); 
  
    max_inner_vects = { [i,j]-> max(arr3d[[i,j]]) };       
     print( max_inner_vects);

   max_inner_arrays = { [i] -> max( arr3d[[i]])};
    print( max_inner_arrays); 


   max_outer_arrays = { [i] -> max( arr3d[[.,.,i]])};
    print( max_outer_arrays);
              
   return(0);
}

Compilation errors as follows: 
ABORT: line 11  file: AxisContMax.sac
ABORT: No definition found for a function "Array::max" that expects 1
ABORT: argument(s) and yields 1 return value(s)

Also the "ls  $SACBASE" yields following subdirectories (without runtime):  
README  sac  sac2c  stdlib

I am wondering if it relates to the compilation problem mentioned above. 

Could you please kindly help advise how to solve the problem. Thanks very much!

Best Regards,

Huibin Shi 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sac-home.org/pipermail/sac-user/attachments/20080625/0ac0661f/attachment.html 


More information about the sac-user mailing list