Data Types


AniFrame supports the following data types:

If variable declaration and initialization are combined into a single statement, specifiying the data type is optional; it will be inferred based on the initial value.


Example:

tri: Object = triangle(30, 75, 58, 20, 86, 75)
square = rectangle(30, 20, 55, 55)

num1: Number = -789.10
num2 = 65

txt1: Text = "Allan pls add details"
txt2 = "This is w/o specifying the data type"

green: Color = "#00FF00"
blue = "rgb(0, 0, 255)"

coordinate: Coord = {0, 0}
location = {216, 485.719}

num_list: List = [1, 2, 3.45]
fruits = ["apple", "banana", "tomato"]