FANDOM


Icon Ambig
  This page is lacking examples. Please provide some!

Variables are how FiM++ manages data in memory. There are three primitive data types, as well as arrays and custom objects.

Variables are FiM++'s way of interacting with data in memory.

Types Edit

There are three basic types of variables:

  • Boolean values represent exactly one of two possible values, such as "true/false", "yes/no", "on/off", "1/0", et cetera. They are stored in memory as a single bit.
  • numbers represent 64 bits of data, in IEEE 754 standard double-precision floating-point format. More information on this format can be found on Wikipedia
  • characters represent UTF-8 data. Depending on the individual character, this can take up between 8 and 32 bits, inclusive. More information on this format can be found on Wikipedia

Declaration Edit

Data Types Edit

The following are all the primitive data types in FiM++:

  • Numbers
    • Numbers are 64-bit (double-precision) floating point data types
  • Characters
    • Characters are UTF-8 (up to 8 integer bytes) characters
  • Boolean values
    • Boolean values are 1-bit binary values

An array can be made of any variable using special keywords (usually, appending "s" or "es" onto a preexisting variable type keyword)

Names Edit

Each variable name has the following restrictions:

  • Must not contain any reserved phrases
    • However, literals are okay. Don't forget that this language is case-sensitive, so "Twilight's number" is bad, but "Twilight's Number" is good.
  • Must not contain any punctuation
  • Must begin with one non-whitespace, non-literal character
  • Must end with one non-whitespace character

Each variable name also has the following freedoms:

  • There is no hard limit on the length
  • May have any whitespace character in them (yes, even new lines)
  • May contain literals, as long as they are not at the beginning of the name
    • for instance, cloud 9 is okay, but not 2 princesses
  • May contain apostrophes
  • Encoded in UTF-8

See Also Edit


Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.