Register | Login
Forum Index > Bugs and Fixes > enum error
Author Message
Pages: 1
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1316] enum error - posted: 2012-12-29 18:24:13
Hi Mr Colin.

i have a problem with enum .see this gives error
Code:
//! Button ID for mouse devices
enum MouseButtonID
{
    MB_Left = 0, MB_Right, MB_Middle,MB_Button3, MB_Button4,MB_Button5, MB_Button6,  MB_Button7
}


error

[43,25]: Expected } or identifier but found 524288 in [MagicPro.zir]
Code:
MB_Left = 0, MB_Right, MB_Middle,MB_Button3, MB_Button4,MB_Button5, MB_Button6, MB_Button7,



also why ziron did not allow using the keytag of enum as a const in parameter declration.

e.g
Code:
cons myType = 0;

function bla(myType typ):int32; stdcall; this is okay

enum myTpye {
     a,b,c.....
}
function bla(myType typ):int32; stdcall; this is not okay


http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1317] - posted: 2012-12-29 19:58:39
The problem is that one of the following:

Code:
MB_Right, MB_Middle,MB_Button3, MB_Button4,MB_Button5, MB_Button6,  MB_Button7


possible MB_Right or MB_Middle

is already declared somewhere, maybe in an include file?

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1318] - posted: 2012-12-29 20:06:49

i think you are correct.

thanks you.

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1319] - posted: 2012-12-29 20:16:11
as for the type enum, check samples (samples\enum\enum.zir) i think there is a sample of what you want to do smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 8 user(s) online. 0 member(s) and 8 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd