Re: [Gambas-user] vb ENUMS

2011-11-11 Thread Rolf-Werner Eilert
Aaah ok, I got it. Thank you! :-) Am 11.11.2011 10:15, schrieb Ron: > In this project they are used to refer to byte positions in a byte[] array > I think it makes it just more clear what that positions is used for. > > So instead of using RecBuf[1] to refer to a position, you can use > RecBuf[SEC

Re: [Gambas-user] vb ENUMS

2011-11-11 Thread Ron
In this project they are used to refer to byte positions in a byte[] array I think it makes it just more clear what that positions is used for. So instead of using RecBuf[1] to refer to a position, you can use RecBuf[SECURITY2.packettype] with the defined ENUM below. Regards, Ron_2nd. > I'm just

Re: [Gambas-user] vb ENUMS

2011-11-11 Thread Rolf-Werner Eilert
I'm just curious: What are enums good for? Never heard of it... Rolf Am 11.11.2011 09:59, schrieb Ron: > Ok, thanks! > >> yes create a class SECURITY2 >> >> public enum packetlength = 0, packettype = 1, etc >> >> actually enum is not fully implemented in gambas :/ maybe for the 4.0 >> >> 2011/11

Re: [Gambas-user] vb ENUMS

2011-11-11 Thread Ron
Ok, thanks! > yes create a class SECURITY2 > > public enum packetlength = 0, packettype = 1, etc > > actually enum is not fully implemented in gambas :/ maybe for the 4.0 > > 2011/11/11 Ron: >> I'm porting a vb project and it uses a lot of ENUM definitions, I cannot >> find a similar way to use t

Re: [Gambas-user] vb ENUMS

2011-11-11 Thread Fabien Bodard
yes create a class SECURITY2 public enum packetlength = 0, packettype = 1, etc actually enum is not fully implemented in gambas :/ maybe for the 4.0 2011/11/11 Ron : > I'm porting a vb project and it uses a lot of ENUM definitions, I cannot > find a similar way to use them in Gambas2/3. > > The

[Gambas-user] vb ENUMS

2011-11-11 Thread Ron
I'm porting a vb project and it uses a lot of ENUM definitions, I cannot find a similar way to use them in Gambas2/3. They get referred to with: SECURITY2.packettype ENUM SECURITY2 AS Integer packetlength = 0 packettype = 1 subtype = 2 seqnbr = 3 id1 = 4 id2 = 5