Не WTF, просто забавно.

    Date: 12/13/07 (Code WTF)    Keywords: no keywords

    enum eValType { UNDEF, INT_VAL, REAL_VAL, STRING_VAL, ARRAY_VAL, HASH_VAL, POINTER_VAL};

    Функция приведения enum к human-readable виду:

    ...
    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

« CWnd::CenterWindow() || Такого вы еще... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home