A primary goal of EViews 7 was to improve the support for developing EViews programs. With improvements ranging from the large (functions to create user-defined dialogs and string list processing) to the small (single-keystroke commenting of a block of program lines) EViews 7 ofers tools designed to make your life as a programmer that much easier.
User-Defined Dialogs
Have you ever wanted to interact with a running EViews .prg programs, say to provide additional input or retrieve information? Well, EViews 7 offers the abiilty to construct several types of user-interface controls, or dialogs, within your program. These dialogs permit users to input variables or set options during the running of the program, and allow you to to pass information back to users.
There are five new functions for creating dialogs in EViews:
· @uiprompt - creates a prompt control, which displays a message to the user.
· @uiedit - creates an edit control, which lets users input text.
· @uilist - creates a list control, which lets users select from a list of choices.
· @uiradio - creates a set of radio controls, which lets users select from a set of choices.
· @uidialog - creates a dialog which contains a mixture of other controls.
Each dialog function returns an integer indicating how the user exited the dialog.
Strings
The programming language tools for working with strings have been greatly enhanced EViews 7. In addition to an expanded library of string functions, EViews 7 introduces list processing and provides new string and string vector objects to hold string results from the workfile structure.
Program language syntax has also been extended to support the increased prominence of strings. You should find it much easier to produce programs that manipulate and use strings. Notably, you may now use string replacement variables recursively, so that a string replacement variable may itself be obtained from a replacement variable (e.g., "{{%x}}" refers to the variable referred to by the contents of the string "%x").
EViews 6 allowed you to use control ("!") variables and string ("%") variables in defining FOR loops. You could not, however, use a scalar objects in a loop definition. EViews 7 extends the syntax for loops to allow use of both scalar and string objects. More generally, all variables byles (control, scalar, string literal, string object) may now be used in virtually all programming contexts..
Object Data Members
Recall that every object type in EViews has a selection of data members. These members contain information about the object and can be retrieved from an object to be used as part of another command, or stored into the workfile as a new object. Data members can be accessed by typing the object name followed by a period and then the data member name. Note that all data members' names start with an "@" symbol.
To improve your ability to write general use programs, EViews 7 offers an expanded set of object data members that provide access to information about the object.
For example, the following new data members belong to every object type in EViews:
|
Data Member |
Description |
|
@description |
Returns a description of the object (if available) |
|
@displayname |
Returns the display name of the object. If the object has no display name, the name is returned |
|
@name |
Returns the name of the object |
|
@remarks |
Returns the remarks field of the object (if available) |
|
@source |
Returns the source field of the object (if available) |
|
@type |
Returns a string containing the object type |
|
@units |
Returns a string describing units of the object (if available) |
|
@updatetime |
Returns the string representation of the time the object was last updated |
More generally, each object type has a set of new data members specific to that type. Most notably, equation and other estimation objects now allow you to obtain text information about the specification and sample used in estimation.
Program Logging
It is sometimes useful to keep track of what is happening during execution of a program. EViews 7 new log windows allow you to record the state of various objects in your workfile or follow program progression.
Log windows are automatically created when a program is executed, if logging has been turned on. One log window is created for each program. If a program is executed more than once and a log window has already been created, the log window will be cleared and all subsequent messages will go to the existing log window. If you wish to preserve a log, you may either save the log to a text file or freeze it, creating a text file object.
There are several types of messages which can be logged: program lines, status line messages, user log messages, and program errors. When displayed in a log message, each type will appear in a different color, making it easier to differentiate one type from another. Program lines are reiterations of the line of code in the program currently being executed and are displayed in black. Status line messages are the messages displayed in the status line and appear in blue. User log messages are custom messages created by the program via the See logmsg. command and appear in green. Program errors are messages generated when a logical or syntactical error has occurred and appear in red.

Comment Lines
EViews 7 provides new tools for easily commenting and uncommenting of blocks of lines in the EViews program file editor.
A block of lines may be commented or uncommented in the editor by highlighting the lines, right-mouse clicking, and selecting Comment Selection or Uncomment Selection. Alternately, you may also use CTRL-K to comment and CTRL-U to uncomment lines.
Text Objects
Text objects have additional data members that should make them more useful for holding blocks of text information that do not naturally fit in an alpha series, string, or string vector. In addition, you may now more easily move text into and out of a text object.
General Information Functions
One development focus in EViews 7 has been to offer more functions for obtaining information of use to users writing EViews programs. Along with a host of new object data member functions, EViews features new functions for looking up objects in the work file or files in a directory, for obtaining information about the current work file (number of pages, names of pages, structure of pages, sample), and for retrieving information about the EViews environment (version number, produce name). |