[sac-user] No definition found for a function "Array::max" that expects 1
Sven-Bodo Scholz
S.Scholz at herts.ac.uk
Tue Jun 24 18:17:12 BST 2008
On Wed, Jun 25, 2008 at 12:04:20AM +0800, shbnj at 163.com wrote:
Hi Huibin,
your setup is fine. The unary version of max has been renamed into
maxval. Unfortuately, that has not been reflected in the tutorial....
So, changing max into maxval should do the job.
Cheers,
Bodo
> 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
>
>
> _______________________________________________
> sac-user mailing list
> sac-user at sac-home.org
> http://lists.sac-home.org/mailman/listinfo.cgi/sac-user
More information about the sac-user
mailing list