Skip to main content
1-Visitor
April 18, 2014
Question

Sub-Routines at the end of the program

  • April 18, 2014
  • 2 replies
  • 939 views

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

25-Diamond I
April 18, 2014

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.

24-Ruby IV
April 19, 2014

cube(a):=a^3