Oharra
Baimena behar duzu orria atzitzeko. Direktorioetan saioa has dezakezu edo haiek alda ditzakezu.
Baimena behar duzu orria atzitzeko. Direktorioak alda ditzakezu.
La palabra clave switch selecciona el discriminante de un encapsulated_union.
switch (switch-type switch-name)
Parámetros
-
switch-type
-
Especifica un tipo int, char, enum o un identificador que se resuelve en uno de estos tipos.
-
switch-name
-
Especifica el nombre de la variable de tipo switch-type que actúa como discriminante de unión.
Ejemplos
typedef union _S1_TYPE switch (long l1) U1_TYPE
{
case 1024:
float f1;
case 2048:
double d2;
} S1_TYPE;
/* in generated header file */
typedef struct _S1_TYPE
{
long l1;
union
{
float f1;
double d2;
} U1_TYPE;
} S1_TYPE;
Vea también