Pergunta

I cannot understand what this code is doing and I found no documentation about it.

if FComponentState * [csDesigning, csInline] = [csDesigning, csInline] then
Foi útil?

Solução

the * operator represents the intersection of two sets and is documented in the official documentation of Delphi (see Set Operators).

Outras dicas

The set intersection operator * has been part of Pascal since its inception.

This particular example checks that both elements are present in the set.

As mentioned already * gives the intersection of two sets.

if FComponentState * [csDesigning, csInline] = [csDesigning, csInline] then checks if both csDesigning and csInline are in FComponentState. It does so by first getting the intersection between FComponentState and [csDesigning, csInline] and than verify that it is the same as [csDesigning, csInline].

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top