Article View: fr.comp.lang.c
Article #15673Syntaxe enum
From: David Noyelle
Date: Mon, 05 Sep 2005 16:34
Date: Mon, 05 Sep 2005 16:34
29 lines
1507 bytes
1507 bytes
Bonjour,
je cherche la syntaxe pour mettre en place un enum avec des valeurs int
allant de '-1' a '-14'. Cette valeur est en fait le code de retour d'une
fonction, et ca me semble un peu long avec un switch...
par ex:
enum TYPE_ERREUR_1 {-1, -2, -3, -4, -5, -6, -7};
enum TYPE_ERREUR_2 {-1, -2, -3, -4, -5, -6, -7};
................
int_retour = maFonction();
switch(int_retour)
{
case TYPE_ERREUR_1:
................
break;
case TYPE_ERREUR_2:
................
break;
}
Merci d'avance pour vos suggestions,
--
David NOYELLE
davidnoyelle chez yahoo point fr
Technical Details
Message-ID:
<431c738f$0$11084$626a14ce@news.free.fr>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!proxad.net!infeed-2.proxad.net!news3-e.free.fr!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f9822,4e37a5742151792c,start X-Google-Attributes: gidf9822,public X-Google-Language: FRENCH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!proxad.net!infeed-2.proxad.net!news3-e.free.fr!not-for-mail Reply-To: "David Noyelle" <widax@free.fr> From: "David Noyelle" <widax@free.fr> Newsgroups: fr.comp.lang.c Subject: Syntaxe enum Date: Mon, 5 Sep 2005 18:34:04 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Lines: 31 Message-ID: <431c738f$0$11084$626a14ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 05 Sep 2005 18:34:23 MEST NNTP-Posting-Host: 212.76.252.39 X-Trace: 1125938063 news3-e.free.fr 11084 212.76.252.39:1931 X-Complaints-To: abuse@proxad.net