[Lazarus] Passing Enum as Parameter

classic Classic list List threaded Threaded
3 messages Options
DSK
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Passing Enum as Parameter

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


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Passing Enum as Parameter

Mattias Gaertner
On Fri, 25 Feb 2011 19:05:37 +0000 (UTC)
"DSK" <[hidden email]> wrote:

> 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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
DSK
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Passing Enum as Parameter

DSK
Mattias,

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


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus