Create a when
condition block, where whether a block of logic is
executed or not depends on the conditional.
Create a when
condition block, where whether a block of logic is
executed or not depends on the conditional.
condition to execute upon
logic that runs only if cond
is true
when ( myData === 3.U ) { // Some logic to run when myData equals 3. } .elsewhen ( myData === 1.U ) { // Some logic to run when myData equals 1. } .otherwise { // Some logic to run when myData is neither 3 nor 1. }