NI TestStand

取消
显示结果 
搜索替代 
您的意思是: 

Exit from an if/end block with a goto?

Can I exit an if/end block with a goto (bypassing the 'end' step)? It seems to work ...

 

Pseudocode

1. Get serial number via dialog

2. If 'cancel' not pressed

  1. if serial number is malformed goto 'Get serial number via dialog'

3. End if

0 项奖励
1 条消息(共 2 条)
2,933 次查看

Hi stephenb2,

 

I took a look at your code, and it looks good. goto steps are commonly used for this purpose, to add it different branches of execution order dependent on either post conditions/expressions or conditional steps. Here's some additional documentation if you want more detailed information on these types os steps:

 

How Can I Skip to a Specific Step in a TestStand Sequence?

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P7Q2SAK&l=en-US

 

Goto Step

https://www.ni.com/docs/en-US/bundle/teststand-api-reference/page/tsref/goto-step.html

Jorr-El
Systems Engineer
Testeract: Automated Test Specialists
0 项奖励
2 条消息(共 2 条)
2,885 次查看