需要'While,' 'Until,' 或语句结束

VBScript


需要 'While'、'Until' 或语句结束

创建了一个Do循环,但是未包含相关的关键词While Until。一个Do 循环的测试条件需要在测试条件语句中使用一个WhileUntil 关键词。下面演示了 一个Do 循环的正确结构。

Do [{While | Until} condition]
   [statements]
   [Exit Do]
   [statements]
Loop 

Or, you can use this syntax:

Do
   [statements]
   [Exit Do]
   [statements]
Loop [{While | Until} condition]

要纠正该错误

  • 确保Do循环包含了所有必须的部分。
  • 使用关键字While Until来结束Do循环。loop with either the While or Until keywords.

请参阅

代码中循环 | Do...Loop 语句 | For...Next 语句 | For...Next 语句 | While...Wend 语句 | Exit 语句