create function from a calculation?

General discussion about Go Calc

create function from a calculation?

Postby lappi.kjeisz » Tue Oct 14, 2008 3:01 am

How do I make my calculation a function so that I can use it in other calculations? I tried referencing it as a function by typing name(a,b), a and b being the inputs, but it was unrecognized.

Thanks,

L.K
lappi.kjeisz
 
Posts: 5
Joined: Tue Oct 14, 2008 2:40 am

Re: create function from a calculation?

Postby wesmd » Tue Oct 14, 2008 2:27 pm

I'm not sure if this is what you want but if you have two results and simply want to do something like a+2*b, you just enter that as a formula for a third result, call it "c" if you will.

As far as I know there are no universal variables that work over all calculations, however.
wesmd
 
Posts: 20
Joined: Sun Aug 03, 2008 3:07 pm

Re: create function from a calculation?

Postby lappi.kjeisz » Tue Oct 14, 2008 11:47 pm

Thanks for the reply. Perhaps I was confused by the statement in the "Help" entry under "Formulas": "Functions - make use of your functions in your formula." Is "your functions" a typo? I would otherwise lead me to believe that I can create a function from a calculation. The advantages would be quicker and less error-prone writing of complicated calculations, the ability to write and debug fragments of a calculation and to modify them separately, and the shortening of what might become quite long individual calculations.

User functions wouldn't require global variables, but they would need argument passing (which you already must have), and some ability to stack function calls.

I hope you can introduce this capability some day (but then, everyone's an architect, aren't they).

Best regards,

L.K
lappi.kjeisz
 
Posts: 5
Joined: Tue Oct 14, 2008 2:40 am

Re: create function from a calculation?

Postby wesmd » Fri Oct 17, 2008 6:53 pm

I'm not the developer, only a contented user.
But I would agree with you that the help screen is confusing. The functions referred to in the statement "make use of your functions in your formula" refer to the functions that are available from the program itself. In a sense since one can select these functions they are "your" functions. But they are not functions that you yourself can write.

Again if f(x) = a + b*x, then simply substitute the actual formula for the function notation, and I think you should be able to attain what you want.
wesmd
 
Posts: 20
Joined: Sun Aug 03, 2008 3:07 pm

Re: create function from a calculation?

Postby mgkennard » Fri Oct 17, 2008 7:01 pm

Sorry about the misleading help documentation! One option that is being mulled over at the moment is to have a Library category. Any functions in this category would be available for use in calculations.

Matthew
Apps On The Move
mgkennard
Site Admin
 
Posts: 758
Joined: Mon Jul 21, 2008 2:40 pm

Re: create function from a calculation?

Postby lappi.kjeisz » Sat Oct 18, 2008 3:07 am

Well, then. A library would do it for me! With unlimited recursion and nesting, of course.

And I should add that I am enjoying Go FIgure all the same.

Thanks for the comments.

L.K
lappi.kjeisz
 
Posts: 5
Joined: Tue Oct 14, 2008 2:40 am


Return to General discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron