문제

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