Table procedures cannot interpret expressions provided as arguments in a programme
Posted: Tue Feb 26, 2019 3:48 am
Dear Eviews team
I use Eviews 10 March 2018 build
it seems that expressions used as arguments in table procedures such as deleterow and deletecol are not interpreted as expected. The example
would not work as expected .
Table procedures seem to interpret only the first part of the expression (i.e., "5" in the example provided above) rather than taking the full expression (i.e. "5-!x" in the above example). See also example code provided below.
Obviously, defining a new variable containing the number of rows to be deleted, and using the variable in the procedure call, works.
However, this work-around is a bit cumbersome. Could this be changed in future updates of Eviews so that table procedures would interpret numerical expressions properly?
Best
mamo
I use Eviews 10 March 2018 build
it seems that expressions used as arguments in table procedures such as deleterow and deletecol are not interpreted as expected. The example
Code: Select all
tab.deleterow 5-!x
would not work as expected .
Table procedures seem to interpret only the first part of the expression (i.e., "5" in the example provided above) rather than taking the full expression (i.e. "5-!x" in the above example). See also example code provided below.
Obviously, defining a new variable containing the number of rows to be deleted, and using the variable in the procedure call, works.
However, this work-around is a bit cumbersome. Could this be changed in future updates of Eviews so that table procedures would interpret numerical expressions properly?
Best
mamo
Code: Select all
wfcreate u 1
table tab
for !r=1 to 20
tab(!r,1)=!r
next
!x=3
' The following lines deletes 5 rows instead of 2
tab.deleterow(5) 5-!x
show tab
' This work-around works, but it is also cumbersome
!rowstodelete=5-!x
tab.deleterow(5) !rowstodelete
'Interestingly, expressions are correctly interpreted when they are used as references to rows or columns
tab.deleterow(!x+2) 1
' Why don't expressions work when used as arguments to table procedures?