第四章 M文件与程序设计.pdfVIP

  • 16
  • 0
  • 约2.1万字
  • 约 16页
  • 2017-06-02 发布于湖北
  • 举报
第四章 M 文件和程序设计 4.1 程序控制语句 4.1.1 分支控制 分支控制语句有 if 和 switch 两种语句 1. if 结构 if expression commands end 【说明】:当表达式expression 的值为真,则执行commands 语句组,否则跳过 commands 语句组, 执行 end 之后的语句。 2. if-else 结构 if expression commands1 else commands2 end 【说明】:如果表达式expression 的值为真,则执行语句组commands1,然后跳过语句组 commands2 向下执行;若表达式expression 的值为假,则跳过语句组commands1 而执行语句组 commands2 。 3. if-elseif-else 结构 if expression_1 command

文档评论(0)

1亿VIP精品文档

相关文档