Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Eviews5 / EViews5 / Docs / EViews 5 Command Ref.pdf
Скачиваний:
91
Добавлен:
23.03.2015
Размер:
5.23 Mб
Скачать

Appendix H. Programming Language Reference

The following reference is an alphabetical listing of the program statements and support functions used by the EViews programming language.

For details on the EViews programming language, see Chapter 6, “EViews Programming”, on page 83. For a quick summary of these entries, see “Programming Summary” on page 116.

call

Program Statement

 

 

Call a subroutine within a program.

The call statement is used to call a subroutine within a program.

Cross-references

See “Calling Subroutines” on page 111. See also subroutine (p. 641), endsub (p. 634).

@date

Support Function

 

 

Syntax: @date

Return: string

Returns a string containing the current date in “mm/dd/yy” format.

Examples

%y = @date

assigns a string of the form “10/10/00“.

Cross-references

See also @time (p. 642).

634—Appendix H. Programming Language Reference

else

Program Statement

 

 

ELSE clause of IF statement in a program.

Starts a sequence of commands to be executed when the IF condition is false. The else keyword must be terminated with an endif.

Syntax

if [condition] then

[commands to be executed if condition is true]

else

[commands to be executed if condition is false] endif

Cross-references

See “IF Statements” on page 100. See also, if (p. 636), endif (p. 634), then (p. 642).

endif

Program Statement

 

 

End of IF statement. Marks the end of an IF, or an IF-ELSE statement.

Syntax

if [condition] then

[commands if condition true] endif

Cross-references

See “IF Statements” on page 100. See also, if (p. 636), else (p. 634), then (p. 642).

endsub

Program Statement

 

 

Mark the end of a subroutine.

Syntax

subroutine name(arguments) commands

exitloop—635

endsub

Cross-references

See “Defining Subroutines” beginning on page 109. See also, subroutine (p. 641), return (p. 639).

@errorcount

Support Function

 

 

Syntax:

@errorcount

Argument:

none

Return:

integer

Number of errors encountered. Returns a scalar containing the number of errors encountered during program execution.

@evpath

Support Function

 

 

Syntax:

@evpath

Return:

string

Returns a string containing the directory path for the EViews executable.

Examples

If your currently executing copy of EViews is installed in “D:\EVIEWS”, then

%y = @evpath

assigns a string of the form “D:\EVIEWS”.

Cross-references

See also cd (p. 234) and @temppath (p. 641).

exitloop

Program Statement

 

 

Exit from current loop in programs.

exitloop causes the program to break out of the current FOR or WHILE loop.

Syntax

Command: exitloop

636—Appendix H. Programming Language Reference

Examples

for !i=1 to 107

if !i>6 then exitloop

next

Cross-references

See “The FOR Loop” on page 102. See also, stop (p. 641), return (p. 639), for (p. 636), next (p. 637), step (p. 640).

for

Program Statement

 

 

FOR loop in a program.

The for statement is the beginning of a FOR...NEXT loop in a program.

Syntax

for counter=start to end [step stepsize]

[commands]

next

Cross-references

See “The FOR Loop” on page 102. See also, exitloop (p. 635), next (p. 637), step (p. 640).

if

Program Statement

 

 

IF statement in a program.

The if statement marks the beginning of a condition and commands to be executed if the statement is true. The statement must be terminated with the beginning of an ELSE clause, or an endif.

Syntax

if [condition] then

[commands if condition true]

endif

Соседние файлы в папке Docs