Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-02

Passing Enum as Parameter

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

DSK

Tired of thunking my head against the monitor trying to figure this out. I'm trying to port a tool written in Lazarus to Delphi. The tool uses tiOPF is called tiMapper and I'm trying to build the accompanying test unit. One of the huge number of compile errors I'm trying to sort out is: function FindByGender(const AGender: enum): integer; [DCC Error] person_bom.pas(92): E2003 Undeclared identifier: 'enum'

Is 'enum' a valid identifier in Lazarus?

Sorry but F1 provides nothing and google comes back with 17 bazillion hits and not one means a damn thing to me.

Thanks,

DSK Posted with 1.19.1.269

Reply by email

Mattias Gaertner
to DSK
Show quoted text 8 lines
Tired of thunking my head against the monitor trying to figure this out. I'm trying to port a tool written in Lazarus to Delphi. The tool uses tiOPF is called tiMapper and I'm trying to build the accompanying test unit. One of the huge number of compile errors I'm trying to sort out is: function FindByGender(const AGender: enum): integer; [DCC Error] person_bom.pas(92): E2003 Undeclared identifier: 'enum' Is 'enum' a valid identifier in Lazarus?

Yes.
That means: it is not a keyword you can use it as an identifier.

Sorry but F1 provides nothing and google comes back with 17 bazillion hits and not one means a damn thing to me.

Have you searched for 'enum' in the tiOPF sources? Maybe you have to add a unit to your uses section.

Mattias

Reply by email

DSK
to Mattias Gaertner

Mattias,

Show quoted text 7 lines
>function FindByGender(const AGender: enum): integer; >[DCC Error] person_bom.pas(92): E2003 Undeclared identifier: 'enum' > >Is 'enum' a valid identifier in Lazarus? Yes. That means: it is not a keyword you can use it as an identifier.

There is no type or declared identifier "enum" in FPC ... thanks.

Have you searched for 'enum' in the tiOPF sources? Maybe you have to add a unit to your uses section.

Yes I have looked, but it's likely worth another try. I'll have to have another look in the remaining project files as well.

Thanks,

DSK Posted with 1.19.1.269

Reply by email