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