wiki:olivine/dsl/types/core

Core Types in Olivine

text

Text is just that, text. You string a line of characters together and wrap them in a pair of double-quotes. In fact, in most languages this type is called string. Here is an example of text:

"Hello World!"

integer

Integers are whole numbers, they are numbers without fractions. They can be positive or negative but cannot have a decimal point. For example, the most important whole number in all of the universe is:

42

real

Reals are rational numbers, they are numbers that may have decimal points. They can be positive or negative and although are compatible with whole number values you must always specify a decimal point to explicitly express a real value. Some Olivine constructs require expressing percentage values. Here are examples of reals (for reals!):

42.0

7.8

-23.82

percent

Percentages are like reals, the difference being that the decimal place is moved two points to the right. A value of 42% is the same as a real value of 0.42. Examples:

42%

2.8%

0.01%

list

A list is a type that contains multiple instances of some other type. All the items in the list must be the same type. Here is a list of text for example:

[
   "First item"
   "Second item"
   "Third item"
]

Lists can also be expressed on a single line using a comma separator, for example:

[ "First item", "Second item", "Third item" ]
Last modified 4 years ago Last modified on May 22, 2020 11:01:58 PM