cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Sub-Routines at the end of the program

ptc-4888566
1-Newbie

Sub-Routines at the end of the program

Hi,

Is there a way to define sub - routines at the end of the program like -

a=3

Ans=cube(a)

cube(a)= a*a*a

PS: I dont want to combine the call function and function definition.....

Thanks in Advance,

Prithivi

2 REPLIES 2

Yes, you can call one user defined function from within another.

You can even define the called function at the end of the sheet if you use a global definition. But in my opinion global definitions should be used only sparingly if at all as they make a sheet harder to read and debug.

I would rather prefer putting the definitions you want to hide in a collapsed area at the top of the sheet.

cube(a):=a^3

Top Tags