#1 2018-07-13 13:17:36

camu72
Member
From: Salta - Argentina
Registered: 2015-07-12
Posts: 27

Set of enumerated types as integer

Hi ab,
I know that TSQLRecord supports "set of enumerated types" in the declaration of its properties and is serialized as an integer. Is there a function in the library that can be used to convert SetOfEnumeratedTypes to integers and vice versa?
I tried to trace in the code, but I could not find where.
Thanks in advance.

Offline

#2 2018-07-13 15:27:30

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,203
Website

Re: Set of enumerated types as integer

Just use byte(myset) or word(myset) or integer(myset) transtyping - depending on the number of items in the set.
This is standard pascal.

Offline

#3 2018-07-13 17:35:38

camu72
Member
From: Salta - Argentina
Registered: 2015-07-12
Posts: 27

Re: Set of enumerated types as integer

Ok Thanks  ab.

Offline

Board footer

Powered by FluxBB