質問

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

if FComponentState * [csDesigning, csInline] = [csDesigning, csInline] then
役に立ちましたか?

解決

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

他のヒント

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].

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top