Skip to content

AmiScript 2: Control Flow in AMI

This second tutorial in the series will start to explore the ways we can compare multiple pieces of data; are they equal, unequal, is one larger or smaller? We will also look at how to construct more complex comparisons using logical operators. These comparisons will be used to control the flow of execution using if statements, which allow us to optionally execute (run) some code based on a condition. We will also briefly cover the ternary operator and how to nest if statements. Finally we will use what we learnt by adding feaures to our calculator from the previous tutorial.

  • Topics Covered


    • Operators:
      • Equality and Inequality
      • Relational
      • Conditional
      • Complement
  • Topics Covered continued...


    • if statement including:
      • else block
      • else if block
      • nesting
    • Ternary Operator
    • Improving the calculator from the previous tutorial.