开发者

<variable>! syntax in Visual Basic 6

开发者 https://www.devze.com 2023-03-01 01:09 出处:网络
I\'m working through some legacy code for a client and I think I understand this line but I need vb expert to double-check me.

I'm working through some legacy code for a client and I think I understand this line but I need vb expert to double-check me.

QS1! = Unit1.XICFMc(1)

My guess is that this saying:

"If QS1 doesn't exist, DIM it and assign it the value in the first position in Unit1.XICFMc"

Am I right? I can't find a definition for QS1 anywhere开发者_运维百科 in the project - which is what lead me to my guess above.


Given the lack of Option Explicit, a variable is implicitly created when first used.

The ! clarifies that QS1 is of type Single.


Isn't a trailing ! mean that the QS1 variable should be typed as Single. This is a holdover from early versions of basic that used postfixes to declare types. v$ was a string, v% was an integer etc. IIRC, you cannot have option explicit on for this to work.

0

精彩评论

暂无评论...
验证码 换一张
取 消