FreeBASIC - types and variables

Types and variables are closely related because variables are the most important elements of our program in which we store data, partial results of our calculations. Types tell us what data can be stored in variables.

Basic data types

Simple data types that can be numbers, characters, or logical types. They are suitable for storing one value.

Type conversions

Using a type conversion we can change the type of existing types. Thanks to this we can overwrite automatic conversion.

Variables

Variable is used for storing the data. can be declared in different locations and can be used in different locations. it can be distinguished according to the lifetime: they are global or local static variables. it is possible use in the structure or function.
Variable declaration: As Variable use

Examples - FreeBASIC

FreeBASIC

Other pieces of example codes:
a = 5 < 10
Dim x As ushort=280
z = CInt((x * y))
Dim b As boolean= x
y =CDbl((x * y))
Dim x As longint= -82345
Languages: en hu cz sk