illegal or reserved name

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

fhespeler
Posts: 14
Joined: Thu Jul 07, 2016 3:10 am

illegal or reserved name

Postby fhespeler » Thu Jul 07, 2016 3:21 am

Dear forum,

when executing the following program:

pagecreate(id,page=type1_type2) @date @srcpage mod_10_l3_m0

scalar nom = 22

!modnumber = 0

table(40+3,5*2*nom) type1type2

for %temp mod_10_l2 mod_10e_l2 mod_0_l2 mod_10_o36_l2 mod_9_l2 mod_9e_l2 3per_l2 3perasy_l2 5per_l2 5perasy_l2 2mom_l2 mod_10_l3_m0 mod_10_o104_l3 3per_l3 3perasy_l3 2mom_l3 5per_l3 5perasy_l3 mod10_o104_l4 mod10_l4_m0 mod10_o104_l4_m0 mo10_o104_l4_m10 '

..............
other code in between
...................

%copydest1 = "type1_type2\"+ %temp +"1"
%copydest2 = "type1_type2\"+ %temp +"2"
copy resultsuptable {%copydest1}
copy resultsstatetable {%copydest2}
pageselect type1_type2
%name1 = %temp+"1"
%name2 = %temp+"2"
type1type2(2,1+5*!modnumber*2) = %name1+"up"
type1type2(2,1+5*!modnumber*2+5) = %name2+"state"
!pos1=1+5*!modnumber*2
!pos2= 6+5*!modnumber*2
{%name1}.copytable type1type2 4 !pos1
{%name2}.copytable type1type2 4 !pos2
!modnumber = !modnumber +1

next

I get for the loop step "3per_l2" the message that "3PER_L21" is an illegal or reserved name in "COPY RESULTSUPTABLE TYPE1_TYPE2\3PER_L21"". The steps before are correctly executed. Is there an error in my code? How do I need to change it?

PS I already tried some name variation for "3PER_L21" e.g.replacing 1 by letters, but to no effect.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: illegal or reserved name

Postby EViews Gareth » Thu Jul 07, 2016 6:10 am

Object names cannot start with a number
Follow us on Twitter @IHSEViews

fhespeler
Posts: 14
Joined: Thu Jul 07, 2016 3:10 am

Re: illegal or reserved name

Postby fhespeler » Thu Jul 07, 2016 6:35 am

Dear Gareth many thanks, I just wonder - I used the same for loop in other codes and it always worked fine with the names denoting different sheets:are sheets no objects in EVIEWS - just curious?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: illegal or reserved name

Postby EViews Gareth » Thu Jul 07, 2016 6:36 am

Pages are not objects
Follow us on Twitter @IHSEViews

fhespeler
Posts: 14
Joined: Thu Jul 07, 2016 3:10 am

Re: illegal or reserved name

Postby fhespeler » Thu Jul 07, 2016 6:40 am

Ah -that clarifies. many thanks, indeed adding a letter to the object names solves the problem. many thanks again.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 37 guests