Nested procedure definition error in a sub-routine procedure

Hi, I meet a problem when I try to run a stochastic dynamic programming program. well, there is a sub-routine procedure named PF below the main program that need to invoke a external .src named BLIP which lies in a .src file named Function.src in my current dictionary. It's like

/* Policy function via linear interpolation: kgrid, zgrind, and hmat must be given as a global matrices */

proc(1)=PF(k,z);

local knext;

knext=BLIP(kgrid,zgrid,hmat,k,z);

retp(knext);

endp;

And I write function.src into a .lcg file and use lib command to infer to the lib at the beginning . However error still arises

 

Line 231 in D:\Gauss\src\Heer_2ed\Ramsey3d.g
Nested procedure definition G0155
Line 231 in D:\Gauss\src\Heer_2ed\Ramsey3d.g
Syntax error G0008 : 'proc(1)=PF(k,z)'

so can I tackle this problem, thankyou

 

2 Answers



0



Hello,

How did you add the src file to the .lcg file? Did you use the GAUSS Library Tool or the lib command. What library did you add this file to?

I may be misunderstanding, but it sounds to me like you are saying that you are referencing the library that contains this BLIP procedure by using the lib command.

The simplest way for your code to know about BLIP is to add the line:

#include function.src

to the top of the file that defines PF.

aptech

1,773


0



well,I have tried this method but it simply doesn't work. Actually, my error type is Nested procedure definition not Undefined symbol. I have sent you my main program and the .lcg file Heer_2ed_dge for you to check,thank you

Your Answer

2 Answers

0

Hello,

How did you add the src file to the .lcg file? Did you use the GAUSS Library Tool or the lib command. What library did you add this file to?

I may be misunderstanding, but it sounds to me like you are saying that you are referencing the library that contains this BLIP procedure by using the lib command.

The simplest way for your code to know about BLIP is to add the line:

#include function.src

to the top of the file that defines PF.

0

well,I have tried this method but it simply doesn't work. Actually, my error type is Nested procedure definition not Undefined symbol. I have sent you my main program and the .lcg file Heer_2ed_dge for you to check,thank you


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