1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2009-2010 - DIGITEO - Scilab Consortium Operational Team
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- JVM NOT MANDATORY -->
ilib_verbose(0);
mkdir(pathconvert(TMPDIR+"/common_function"));
cd(pathconvert(TMPDIR+"/common_function"));
copyfile(SCI+"/modules/api_scilab/tests/unit_tests/common_function_api.c",pathconvert(TMPDIR+"/common_function/common_function_api.c",%F));
cflags = "-I"+SCI+"/modules/localization/includes";
ilib_build("common_function",["common_function","common_function"],"common_function_api.c",[],"","",cflags);
exec("loader.sce");
l1 = [1,2*%i,3;%i,2,3*%i];
l2 = ["may","the";"puffin","be";"with","you"];
l3 = int8([1,2,3]);
l4 = uint16([1000,2000,3000]);
l5 = list(l1,l2,l3);
l = list(l1,l2,l3,l4,l5);
common_function(l(1:$))
Variable 1 information:
Type: double
Complex: Yes
Dimensions: 2 x 3
Variable 2 information:
Type: strings
Dimensions: 3 x 2
Variable 3 information:
Type: signed integer 8 bits
Dimensions: 1 x 3
Variable 4 information:
Type: unsigned integer 16 bits
Dimensions: 1 x 3
Variable 5 information:
Type: list
Dimensions: 3
ans =
T
|