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

@strnow—607

Example:

%1 = @str(15.23456)

alpha newa = @str(32.56)

See also @val (p. 608).

@strdate

Date Function | String Function

 

 

Syntax:

@strdate(fmt)

Argument:

date format string, fmt

Return:

string corresponding to each element in workfile

Return the set of workfile row dates as strings, using the date format string fmt.

See also @datestr (p. 597) and @strnow (p. 607).

@strlen

String Function

 

 

Syntax:

@strlen(s)

Argument:

string, s

Return:

number n

Same as @len, @length (p. 602).

 

 

@strnow

Date Function | String Function

 

 

Syntax:

@strnow(fmt)

Argument:

date format string, fmt

Return:

string

Returns a string representation of the current date number (at the moment the function is evaluated) using the date format string, fmt.

Example:

@strnow("DD/mm/yyyy")

returns the date associated with the current time in string form with 2-digit days, months, and 4-digit years separated by a slash, “24/12/2003”.

See also @strdate (p. 607) and @datestr (p. 597).

608—Appendix F. String and Date Function Reference

@trim

String Function

 

 

Syntax:

@trim(str)

Argument:

string, str

Return:

string

Returns the string str with spaces trimmed from the both the left and the right.

Example:

@rtrim(" I doubt that I did it. ")

returns the string “I doubt that I did it.”.

See also @ltrim (p. 602) and @rtrim (p. 606).

@upper

String Function

 

 

Syntax:

@upper(str)

Argument:

string, str

Return:

string

Returns the uppercase representation of the string str.

Example:

@length("I did not do it")

returns the string “I DID NOT DO IT”.

See also @lower (p. 602).

@val

String Function

 

 

Syntax:

@val(str[, fmt])

Argument 1:

string, str

Argument 2:

numeric format string, fmt

Return:

scalar

@val—609

Returns the number that a string str represents. You may provide an optional numeric format string fmt. By default, EViews will attempt to interpret the string as a number using standard formats; if this is not possible, the function returns “NA”.

Example:

scalar sc1 = @val("17.4648") scalar sc2 = @val(tab1(3,4)) scalar sc3 = @val("-234.35")

See also @str (p. 606).

610—Appendix F. String and Date Function Reference

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