1exec("swigtest.start", -1); 2 3// bool 4checkequal(arr_bool([%T %F %F %T %F %T %T %T], 8), 5, "arr_bool"); 5 6// char 7checkequal(arr_char(["charptr"], 7), 756, "arr_char"); 8 9// signed char 10checkequal(arr_schar([1, 2, 3, 4], 4), 10, "arr_schar"); 11checkequal(arr_schar(int8([1, 2, 3, 4]), 4), 10, "arr_schar"); 12 13// unsigned char 14checkequal(arr_uchar([1, 2, 3, 4], 4), 10, "arr_uchar"); 15checkequal(arr_uchar(uint8([1, 2, 3, 4]), 4), 10, "arr_uchar"); 16 17// short 18checkequal(arr_short([1, 2, 3, 4], 4), 10, "arr_short"); 19checkequal(arr_short(int16([1, 2, 3, 4]), 4), 10, "arr_short"); 20 21// unsigned short 22checkequal(arr_ushort([1, 2, 3, 4], 4), 10, "arr_ushort"); 23checkequal(arr_ushort(uint16([1, 2, 3, 4]), 4), 10, "arr_ushort"); 24 25// int 26checkequal(arr_int([1, 2, 3, 4], 4), 10, "arr_int"); 27checkequal(arr_int(int32([1, 2, 3, 4]), 4), 10, "arr_int"); 28 29// unsigned int 30checkequal(arr_uint([1, 2, 3, 4], 4), 10, ""); 31checkequal(arr_uint(uint32([1, 2, 3, 4]), 4), 10, ""); 32 33// long 34checkequal(arr_long([1, 2, 3, 4], 4), 10, "arr_long"); 35checkequal(arr_long(int32([1, 2, 3, 4]), 4), 10, "arr_long"); 36 37// unsigned long 38checkequal(arr_ulong([1, 2, 3, 4], 4), 10, "arr_ulong"); 39checkequal(arr_ulong(uint32([1, 2, 3, 4]), 4), 10, "arr_ulong"); 40 41// long long 42// No equivalent in Scilab 5 43 44// unsigned long long 45// No equivalent in Scilab 5 46 47// float 48a = [1, 2, 3, 4]; 49checkequal(arr_float(a, 4), 10, "arr_float"); 50 51// double 52a = [1, 2, 3, 4]; 53checkequal(arr_double(a, 4), 10, "arr_double"); 54 55exec("swigtest.quit", -1); 56