halcon-switch分子语句

Index := 3
TestStr := ''

switch(Index)
*switch语句开始
    case 1:
        *如果Index等于1
    TestStr := TestStr + '1'
    break
    *跳出switch语句
    
    case 2:
    TestStr := TestStr + '2'
    break
    
    case 3:
    TestStr := TestStr + '3'
    break
    
    case 4:
    TestStr := TestStr + '4'
    break
    
    default:
        *如果前面都不匹配,就执行这个分子
    TestStr := TestStr + 'd'
    break
    
    
endswitch
*switch语句结束

 

 

 

halcon-switch分子语句

相关文章:

  • 2022-01-03
  • 2021-06-08
猜你喜欢
  • 2021-10-13
  • 2021-06-08
  • 2022-01-21
  • 2021-11-21
  • 2021-07-01
  • 2022-01-09
  • 2022-12-23
相关资源
相似解决方案