简体   繁体   English

w {%A}(!i + 1)在EViews中是什么意思?

[英]What does w{%A}(!i+1) mean in EViews?

Couldn't find any hint about w{} on eviews documents. 在eviews文档中找不到有关w {}的任何提示。 Any explanation? 有什么解释吗?

w{}(), can't understand how it works. w {}(),无法理解其工作原理。

BTW, how can I print a single variable to command window not print it to a file? 顺便说一句,我如何在命令窗口中打印一个变量而不将其打印到文件中?

Thanks! 谢谢!

Curly braces in EViews work the way that statements like eval() perform in other programming languages. EView中的花括号以类似eval()语句在其他编程语言中执行的方式工作。 They tell EViews "strip quotes off of this string and evaluate it as valid EViews code". 他们告诉EViews“带引号的字符串,并将其评估为有效的EViews代码”。

%A is a "program string", a temporary string variable only used when executing an EViews program. %A是“程序字符串”,是仅在执行EViews程序时使用的临时字符串变量。 !i is a "program scalar", a temporary scalar variable only used when executing an EViews program. !i是“程序标量”,仅在执行EViews程序时使用的临时标量变量。

It's hard to answer your question without knowing what type of object W{%A} is supposed to be. 在不知道对象W{%A}应该是哪种类型的情况下很难回答您的问题。 But if %A holds a value like USA , for example, W{%A} will look for an object in your workfile called WUSA . 但是,例如,如果%A拥有类似于USA的值,则W{%A}将在工作文件中寻找一个名为WUSA的对象。 If !i holds the value 1 , for example, W{%A}(!i+1) is equivalent to WUSA(2) . 例如,如果!i保持值为1 ,则W{%A}(!i+1)等效于WUSA(2) This could, for example, be an attempt to grab a particular element of a vector object. 例如,这可能是尝试获取矢量对象的特定元素。

{} can change a variables value (in programming not series) to string. {}可以将变量值(在编程中不是系列)更改为字符串。 For example if there is WTR, WCR, KJ and Y series in our file, following command would be run. 例如,如果我们的文件中有WTR,WCR,KJY系列,则将运行以下命令。

%A = "TR"
!i=2
ls Y c W{%A}(!i+1)

Means ls Y c WTR(3) and also 表示ls Y c WTR(3)以及

%A = "TR"
%B= "CR"
%F="KJ"
!i=3
!k=-1
 ls Y c W{%A}(!i+1) W{%B}(!k-3)  {%F} 

Means ls Y c WTR(4) WCR(-4) KJ 均值ls Y c WTR(4)WCR(-4)KJ

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM