Int in Verse
Verse uses int as the type for storing and handling integers. An int in Verse can contain a positive number, a negative number, or zero, and has no fractional component. Supported integers range from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, inclusive.
You can include predefined int values within your code as int literals. An int literal is an integer in your code.
The following are examples of how you can create integer constants and variables with int literals:
# This variable will never change, because it is universally correct.
AnswerToTheQuestion : int = 42
# A quiver of arrows costs this many coins, and cannot change:
CoinsPerQuiver : int = 100
# A quiver of arrows contains this many arrows, and cannot change:
ArrowsPerQuiver : int = 15
# The player currently has 225 coins and 3 arrows. These values can change.
var Coins : int = 225
var Arrows : int = 3
# The game keeps track of the total number of purchases the player makes.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.