Date: 12/13/07 (Code WTF) Keywords: no keywords enum eValType { UNDEF, INT_VAL, REAL_VAL, STRING_VAL, ARRAY_VAL, HASH_VAL, POINTER_VAL}; ... switch(eType) { case UNDEF: return "*UNDEF*"; case INT_VAL: return "INTEGER"; case REAL_VAL: return "REAL"; case STRING_VAL: return "STRING"; case ARRAY_VAL: return "ARRAY"; case HASH_VAL: return "HASH"; case POINTER_VAL: return "POINTER"; default: return "OMG_WTF?!"; } Source: http://community.livejournal.com/code_wtf/117991.html
|