Multiple procedure


I want to utilize more than two procedures. Is it possible?

Although I tried like this, error occurs.


proc lik_fcn_a (prmtr1);
local prmtr1, a  ;

proc lik_fcn_b (prmtr2);
local prmtr1, a  ;


This is error statement.

"Nested procedure definition G0155"


Please help me

1 Answer


You can certainly define multiple different procedures in the same GAUSS file. For example, if you make a new file with this content:

//Define two very simple procedures
proc lik_fcn_a(prmtr1);
    local a;
    a = 5;
    retp(a * prmtr1);

proc lik_fcn_b(prmtr2);
    local a;
    a = 1;
    retp(a * prmtr2);

It will run successfully. However, I think there is more to your question that I am not understanding. Are you wanting to have a procedure that calls another procedure? Or do you want to access variables from one procedure inside of another?

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy