Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

else

Purpose

Conditionally execute a block of code when the condition is false

Description

Used to execute a block of code if the condition in the if statement is not met

Syntax

if condition then ... else ... endIf // if condition is met execute first ... otherwise execute second ...

Arguments

condition condition to be tested. This can be a compound condition using AND and OR

Example

limit = 5
y = 0

for i = 0 to 11 loop
    if i < limit then
        printAt( 0, y, "Number: ", i, " is less than ", limit )
    else
        if i == limit then
            printAt( 0, y, "Number: ", i, " is equal to ", limit )
        else
            printAt( 0, y, "Number: ", i, " is more than ", limit )
        endif
    endif 
repeat

update()
sleep( 5 )

Associated Commands

and, else, endIf, if, or, then

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.