[fpc-pascal] How do you test for set membership?
Jonas Maebe
jonas.maebe at elis.ugent.be
Sun Sep 5 15:48:35 CEST 2010
On 05 Sep 2010, at 15:05, Frank Church wrote:
> Running the code below produces this error message:
> rcacsbilling.pas(3660,25) Error: Identifier not found "dbgRemoteLinks"
>
> if [dbgRemoteLinks] in dbgActiveOptions then
> mmoURLPageContent.Lines.AddStrings(procList);
>
> Is that the wrong syntax in FreePascal?
The syntax is wrong, but it should give a different error message. "in" expects a set *element* on the left hand side, why you are using a set. It should read:
if dbgRemoteLinks in dbgActiveOptions then
Even then, I'm not sure whether that will make it compilable if the compiler really cannot find the dbgRemoteLinks identifier. Did you include the unit that defines it in the uses clauses?
Jonas
More information about the fpc-pascal
mailing list