Declare variables in SlowSequence_Campbellsci论坛问答

Hello

Is it allowed to declare variables and constants using PUBLIC and CONST inside a SlowSequence?

Declare variables in SlowSequence_Campbellsci论坛问答

e.g.
BeginProg
Scan
.
NextScan

SlowSequence
PUBLIC testvariable As String
CONST testconst = 999.99
Scan
.
NextScan
EndSequence

EndProg

It compiles and apparently works fine. But since the cr1000 manual states "Public variables, Dim variables, Constants, ... are declared at the beginning of a CRBASIC program." I'm not sure if I risk getting troubles at some point?

Thanks
Manuel

* Last updated by: Monte on 4/26/2010 @ 11:20 AM *

新对话如下:

Manuel,

You should be fine with declarations in a SlowSequence. The manual recommends declarations be placed at the beginning of the program for convenience and ease of future editing.

Regards,
Janet

新对话如下:

Thank you Janet for clarifying this!

分享到:

原文链接:,转发请注明来源!
海洋仪器网 仪器使用 Declare variables in SlowSequence_Campbellsci论坛问答
「Declare variables in SlowSequence_Campbellsci论坛问答」评论列表

发表评论