Verse Library verse

02 Constants

Demonstrates declaring local constants and typed variables, then using them in conditional loop logic.

extracted-snippets/documentation/en-us/uefn/constants-and-variables-in-verse/02-constants.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/constants-and-variables-in-verse
# Local doc:  epic-docs/documentation/en-us/uefn/constants-and-variables-in-verse.md
# Section:    Constants
loop:
Limit := 20
# For local constants, the type can be omitted.
RandomNumber : int = GetRandomNumber()
# Providing the type explicitly can make the code easier to read.
if (RandomNumber < Limit):
break

Comments

    Sign in to vote, comment, or suggest an edit. Sign in