00001 #include "../../routines/machine.h" 00002 #include <stdlib.h> 00003 00004 /************************************************************* 00005 * Example of an integer array created by C code 00006 * converted to output Scilab variable by cintf 00007 *************************************************************/ 00008 00009 C2F(ccalc8) ( a,m,n,err) 00010 int **a,*m,*n,*err ; 00011 { 00012 int i ; 00013 *n=5 ; 00014 *m=3 ; 00015 *a= ( int *) malloc( (unsigned) (*m)*(*n) *sizeof(int)); 00016 if ( *a == (int *) 0 ) 00017 { 00018 *err=1; 00019 sciprint("No more space\r\n"); 00020 } 00021 *err=0; 00022 for ( i= 0 ; i < (*m)*(*n) ; i++) (*a)[i] = i ; 00023 } 00024 00025
1.5.1