Riporto questa discussione apparsa nella Mailing List ufficiale relativamente alla parola chiave
Enum, che, come riporta la guida in linea, dichiara un'enumerazione (o lista numerata, conteggio):
"
Is there a selfexplaining, simpleand clear examplecode available using ENUM ?
The docs example are not sufficient for my weak head.
wally "
"
Really? You use Enum as a more convenient way to declare integer constants:
---' The file permission numerical constants
Private Const PERM_EXEC As Integer = 1
Private Const PERM_WRITE As Integer = 2
Private Const PERM_READ As Integer = 4
---
simply becomes
---Private Enum PERM_EXEC = 1, PERM_WRITE = 2, PERM_READ = 4
---
with the additional ability to have implicit sequences:
---' Counting
Private Const Zero As Integer = 0
Private Const One As Integer = 1
Private Const Two As Integer = 2
---
will be
---Private Enum Zero, One, Two
---
The first value, if not explicitely given, defaults to 0. The n+1-st value
becomes the n-th value plus 1.
Please, make your own example code of it if you want...
Regards,
Tobi