local smpl

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

local smpl

Postby maxchen » Tue Jun 23, 2015 2:53 am

EViews8Patch_042715

It seems that "local smpl" will set "smpl @all" according to ative page when calling the subroutine, not the current active page

Code: Select all

wfcreate(wf=hg,page=info) u 8 pagecreate(page=spot) d5 "1968-01-02" "2015-05-31" '12369 obs table tb pagecreate(page=pw) w "1991-03-28" "1993-02-24" '100 obs %pg = "spot" call subL(%pg,3,1) pageselect pw call subL(%pg,2,0) 'smpl if id3<>na ' only 100 obs subroutine subL(string %pd, scalar !m, scalar !L) '%pd : wf page name, daily '!m : tag '!L : =1, local smpl pageselect {%pd} if !L=1 then local smpl endif smpl @all tb(!m,1) = @otod(1) tb(!m,2) = @otod(@obsrange) genr id{!m} = (@day<=!m) endsub
the table tb shows
'1/02/1968 5/29/2015
'3/28/1991 2/18/1993
the 3rd row is expected to be the same as the 2nd row. and only 100 obs in id3 are not Na

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

Re: local smpl

Postby EViews Gareth » Wed Jun 24, 2015 8:11 am

Yep, that's the way it was designed.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests