size

Indicates the size of a variable according to its RtType

ubyte
size

Return Value

Type: ubyte

0 is returned if the size is variable otherwise the equivalent of the .sizeof property.

Examples

1 struct St {} St st;
2 assert(st.getRtti.type.size == 0);
3 bool bo;
4 assert(bo.getRtti.type.size == 1);
5 ushort us;
6 assert(us.getRtti.type.size == 2);
7 uint ui;
8 assert(ui.getRtti.type.size == 4);
9 long lo;
10 assert(lo.getRtti.type.size == 8);
11 real re;
12 assert(re.getRtti.type.size == real.sizeof);

Meta