Skip to content

Branching Statements #12

@SK1Y101

Description

@SK1Y101

If statement

A singular if is the simplest branching statement, and decides whether a chunk of code will be executed or not, depending on some condition.

Python:

if x == 0:
  print("x was zero")

Verboscript:

if x is equal to zero, then do the following:
  show "x" was zero.

Else statement

if the if was not true, then the else is triggered:

Python:

if x == 0:
  print("x was zero")
else:
  print("x was not zero")

Verboscript:

if x is equal to zero, then do the following:
  show "x" was zero.
otherwise, do this:
  show "x" was not zero.
if x is equal to zero, then do the following:
  show "x" was zero.
else, do this:
  show "x" was not zero.

both otherwise and else could be applicable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions