Hello ,
i have got a new question refering to the “function” command.
First of all I want to understand the Syntax of this command. I read the Guide and check the syntax but why is it not working?
function scalar Model( scalar p,)
q= 3*p
end function
just a small example but to get to understand it. It says : expected a type identifier…. But why ? there is the name of the Function called Model and also the type … scalar…. What is wrong with that?
If I got this, it is my aim to built an Modular System, which means, First on the upper side of the script I want to have the basic formulas, like
1. function series AB (series a, scalar b, scalar c, scalar d)
a*(1-exp(-b*(c-c0)))
end function
2. Function …..
3. Function …..
And so on …
After declaring and defining the parameters und the function body of the basic formulas, I want to stick them together, I need it like this because it depends on the case which basic function I need and also the sequence could be different ( for example: case 1: 2. Formula + 3. Formula + 2. Formula…. Case 2: 3.Formula + 1.Formula …)
My Other Question is is it possible to make this "combinedfunction" easier to write ?
What I mean is let the commands like series oder scalar away, cause its also declared.
Hopefully somebody can help me I thing there will be some other question but I think for the first round it more then enough.
Thank you, and I hope for some answers =)
Daniel.