Skip to content

Language Features Types

Narta Xaymar Dirks edited this page Nov 8, 2026 · 5 revisions

Language Features: Types

Integers, floats and strings, the short and long notation, and converting between them.

Every variable, parameter, function result and field has a type. The originals have integers (Int), floats (Float), strings (String) and the custom types you declare with Type. BlitzLLVM adds more sizes of numbers, see Types and numbers.

A type is written in one of two ways. The short notation puts a character right behind the name: count% is an Int, speed# a Float, name$ a String, big%% a Long, exact## a Double and p.Point an object of the custom type Point. The long notation puts the type behind a colon: count:Int, speed:Float, name:String, big:Long, exact:Double. Both work for variables (Local, Global, Const), parameters, function results (Function Area:Float()) and Fields. A name without a type is an Int. The long notation is preferred, and the short-type-notation warning (level 3) can point out the short one. The originals have no long notation.

The sizes, ranges, alternative names and short forms of all types are in the table on Types and numbers.

Converting to a type is done with a function of the same name: Int, Float, Str, Handle and Object below, and Byte, UByte, Short, UShort, UInt, Long, ULong, Half, Double and Single (the same as Float) for the types BlitzLLVM adds. An Int assigned to a Float, and the other way around, is converted for you.

Back to Language Features or the Command Index.

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

Clone this wiki locally