代码不工作点错误 [英] Code not working point mistake

查看:52
本文介绍了代码不工作点错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sub variablechanged()
on error goto errorhandler
dim MS as streams
dim ST as processstream
dim X as internalvariablewrapper
dim TO as double 
TO = activevariablewrapper.variable.getvalue()
set MS = activeobject.flowsheet.materialstreams
for each ST in MS
  set X = ST.getuservariable("Amb temp")  (term in bracket is also highlighted as red)
  X.variable.getvalue(TO)
NEXT ST
erorhandler:
end sub





我尝试了什么:



(错误指出第6行期待var名称)

和第10行的错误(括号中的术语也突出显示为红色)

代码编写软件名称aspen hysys来创建新的用户变量



What I have tried:

(error is pointing out in 6th line "expecting var name")
and also error in line 10 (term in bracket is also highlighted as red)
the code is written a software name aspen hysys to create new user variable

推荐答案

TO 是保留关键字。您需要重命名它。 此处 [ ^ ]是关键字的详细信息。
TO is a reserved keyword. You will need to rename it. Here[^] are details about the keyword.


机会是 TO 是VB中的保留字。

我担心用户变量名中不允许使用空格。
Chances are that TO is a reserved word in VB.
And I fear that space is not allowed in user variable name.


这篇关于代码不工作点错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆