0
"check or define function %c_a_ce for overloading"

Good afternoon,

I'm facing a problem which I can't understand.

I do exec loader.sce and the files does not run until de end because it says that I should 'define function %c_a_ce'. And I really can't understand why.

I will send in below the email the code writen in the file 'loader.sce' in order to be easier to find out the problem.

"-> // Working directory

--> wdir = pwd();


--> // Loading blocks

--> mprintf(gettext("Loading blocks...\n"));
Loading blocks...


--> loadXcosLibs();


--> toolbox_dir = pathconvert(wdir);

--> // All the available block

--> names = {'Pipe','Junction','Reservoir'};

--> interfaces = names;


--> sciFiles = pathconvert(wdir) + interfaces + ".sci";
in builtin exec( C:\Users\tiago.soares\Downloads\Hydraulic_toolbox\loader.sce line -1 )

Undefined operation for the given operands.
check or define function %c_a_ce for overloading."

The loader.sce file is:

'

/ Load a palette in the Xcos environment
clc

// Working directory
wdir = pwd();

// Loading blocks
mprintf(gettext("Loading blocks...\n"));

loadXcosLibs();

toolbox_dir = pathconvert(wdir);
// All the available block
names = {'Pipe','Junction','Reservoir'};
interfaces = names;

sciFiles = pathconvert(wdir) + interfaces + ".sci";
h5_instances = toolbox_dir + "/images/h5/" + interfaces + ".sod";
pal_icons = toolbox_dir + "/images/png/" + interfaces + ".png";
graph_icons = toolbox_dir + "/images/svg/" + interfaces + ".svg";
// graph_icons = interfaces + ".svg";

xpal = xcosPal("WDS");

for i=1:size(interfaces,2)
    // Load the interface function
    exec(sciFiles(i), -1);
    
    // register to the palette.
    style = struct();
    // protect drive letter
    block_img =  graph_icons(i);
    if getos() == "Windows" then
        block_img = "/" + block_img;
    end
    style.image = "file://" + block_img;
    xpal = xcosPalAddBlock(xpal, h5_instances(i), pal_icons(i), style);
end

xcosPalAdd(xpal);

global %MODELICA_USER_LIBS;
%MODELICA_USER_LIBS = [%MODELICA_USER_LIBS ; pathconvert(wdir)];'


Scilab 26-03-21, 7:32 p.m. TiagoFloating
0

Function overloading is a C++ programming feature that allows us to have more than one Now that we know what is parameter list lets see the rules of overloading: we can have All of the above three cases are valid case of overloading.

TargetPayandBenefits Login

27-03-21, 12:55 p.m. DonaldFlores


0
Thank you very much for your reply, so do you have any ideia what could be the problem?
29-03-21, 4:47 p.m. TiagoFloating


0
Maybe confusion somewhere or the required value has not been determined, try referencing this web impostor configuration because I think it is quite similar.
30-03-21, 8:05 a.m. alucca


0
I've already understand that the problem is referred in this line 'sciFiles = pathconvert(wdir) + interfaces + ".sci";'. It's because it can't run a matrix/array like is code writen, can you please tell me if there if it's normal in C to right it that way? To me, the only way it could works is through iterations but I don't know if in C it's already prepared to receive the code like that. Thank you in advance
30-03-21, 2:04 p.m. TiagoFloating


Log-in to answer to this question.