Kmelia types can be predefined types or user-defined types. Predefined types can be primitive types or abstract data types.
A (currently) restricted form of Generic types, anchor type and subtyping is allowed in Kmelia.
ANYTYPE
which is the supertype common to all types except to Void.LIKE
is an anchor-type associated to the first value encountered in a function signature.In a Kmelia specification Data Types are used in the variable definition clauses (component, service…).
name : String; tab: montablo; point_test : Point; swallowed_cards : setOf CashCard; other_cards : setOf CashCard; available_notes : Integer; intset:monset; intset2:setOf Integer
Structured types are :
struct
array[range]
min..max
enum
library contents here
With the TYPE
clause
TYPES CashCard:: struct {code:Integer; ident:Integer; limit:Integer}; montablo:: array [1..10] of Integer; monset :: setOf Integer RVB :: enum {R,V,B};
see libraries