addin problem....?
Posted: Tue Jun 17, 2014 7:50 am
Hi,
I have a problem with Eviews, and it might be due to the addin that i have made, but i am not sure...?
If you install the global addin addtospec with the command
'indexinstall
addin(type=global, menu = "adds new string in a system equation" , proc="addtospec", desc="adds new string in a system equation") "./addtospec.prg"
and if you run the program "problem_with_addin.prg" on the attached workfile, Eviews will close. But I do not understand why...?
Trying to find the error, I noted something interisting,
Eviews will close when running the program
delete ags_s
svector ags_s=ags.@svectornb
!r=@rows(ags_s)
'add instruments
for !k=1 to 10' "r
'finding country and industry codes in each equation
%var=@word(ags_s(!k),1)
!length=@length(%var)
%id=@mid(ags_s(!k),11, !length-11)
'add instrument
addtospec(k=!k, add= @ log(tfpr_{%id}(-2)) ) ags 'addin that adds a line to the system specification
next
however, if only running
!r=@rows(ags_s)
'add instruments
for !k=1 to 10' "r
'finding country and industry codes in each equation
%var=@word(ags_s(!k),1)
!length=@length(%var)
%id=@mid(ags_s(!k),11, !length-11)
'add instrument
addtospec(k=!k, add= @ log(tfpr_{%id}(-2)) ) ags 'addin that adds a line to the system specification
next
Eviews will not crash. I do not understand why...
Can you please help me
Thomas
I have a problem with Eviews, and it might be due to the addin that i have made, but i am not sure...?
If you install the global addin addtospec with the command
'indexinstall
addin(type=global, menu = "adds new string in a system equation" , proc="addtospec", desc="adds new string in a system equation") "./addtospec.prg"
and if you run the program "problem_with_addin.prg" on the attached workfile, Eviews will close. But I do not understand why...?
Trying to find the error, I noted something interisting,
Eviews will close when running the program
delete ags_s
svector ags_s=ags.@svectornb
!r=@rows(ags_s)
'add instruments
for !k=1 to 10' "r
'finding country and industry codes in each equation
%var=@word(ags_s(!k),1)
!length=@length(%var)
%id=@mid(ags_s(!k),11, !length-11)
'add instrument
addtospec(k=!k, add= @ log(tfpr_{%id}(-2)) ) ags 'addin that adds a line to the system specification
next
however, if only running
!r=@rows(ags_s)
'add instruments
for !k=1 to 10' "r
'finding country and industry codes in each equation
%var=@word(ags_s(!k),1)
!length=@length(%var)
%id=@mid(ags_s(!k),11, !length-11)
'add instrument
addtospec(k=!k, add= @ log(tfpr_{%id}(-2)) ) ags 'addin that adds a line to the system specification
next
Eviews will not crash. I do not understand why...
Can you please help me
Thomas