Page 1 of 1

Annotated Lists

Posted: Mon Feb 05, 2018 11:57 am
by madm
Hi,

I am writing a program that assembles a list of variables that I use to extract series from an external source. As an example, suppose my code looks like this

Code: Select all

%vars = _ "GDP " + _ "CPI " + _ "UNEMP"
As I am adding to and removing from this list on a regular basis and the variable names are often unobvious, I was hoping to be able to annotate them with a comment:

Code: Select all

%vars = _ "GDP " + _ 'Gross domestic product "CPI " + _ 'Consumer price index "UNEMP" 'Unemployment
But it appears the Eviews parser can't handle this and it throws an error. I know I could probably set something up in a table, or I could just list everything again in a commented block, but neither of those ways is good from a maintainability perspective. Is there another way to do what I want to do programmatically? I guess one way would be to make the description part of the string and split it from the variables in the program. Not sure how I would do that.

Re: Annotated Lists

Posted: Mon Feb 05, 2018 12:02 pm
by EViews Gareth
Unfortunately EViews does not allow comments in the middle of a line, so you can't do it like that. I'd just go with a block before hand.