NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

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 Kudos
Message 1 of 2
(2,795 Views)

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 Kudos
Message 2 of 2
(2,747 Views)