Click here to Skip to main content
15,900,815 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to make code block works faster? Pin
Kolich11-May-04 2:41
Kolich11-May-04 2:41 
AnswerRe: How to make code block works faster? Pin
Nitron11-May-04 2:56
Nitron11-May-04 2:56 
GeneralRe: How to make code block works faster? Pin
Kolich11-May-04 3:01
Kolich11-May-04 3:01 
GeneralRe: How to make code block works faster? Pin
Nitron11-May-04 3:09
Nitron11-May-04 3:09 
GeneralRe: How to make code block works faster? Pin
Kolich11-May-04 3:14
Kolich11-May-04 3:14 
GeneralRe: How to make code block works faster? Pin
Nitron11-May-04 3:26
Nitron11-May-04 3:26 
GeneralRe: How to make code block works faster? Pin
Kolich11-May-04 3:33
Kolich11-May-04 3:33 
GeneralRe: How to make code block works faster? Pin
toxcct11-May-04 4:51
toxcct11-May-04 4:51 
you find this elegant ?????????
i agree the ?: operator is elegant when you have few (less than 2) conditions, but it becomes really unreadable otherwise.
more, it uses exactly the same time as the previous post's code. what i prefer is expanding the code, but placing the { }. it doesn't eat bread and it is really more easy to debug.
one last thing. the first written code is (by my thinking quite fast). you can so let it like this :
<font style="color:blue;">if </font>(a > 0) {
    <font style="color:blue;">if </font>(a > 255) {
        b = 255;
    }
    <font style="color:blue;">else</font> {
        b = (BYTE)a;
    }
}
<font style="color:blue;">else </font>{
    b = 0;
}




TOXCCT >>> GEII power


GeneralRe: How to make code block works faster? Pin
Nitron11-May-04 5:00
Nitron11-May-04 5:00 
GeneralRe: How to make code block works faster? Pin
toxcct11-May-04 5:03
toxcct11-May-04 5:03 
GeneralRe: How to make code block works faster? Pin
Nitron11-May-04 5:09
Nitron11-May-04 5:09 
GeneralRe: How to make code block works faster? Pin
toxcct11-May-04 5:14
toxcct11-May-04 5:14 
GeneralRe: How to make code block works faster? Pin
Nitron11-May-04 5:16
Nitron11-May-04 5:16 
AnswerRe: How to make code block works faster? Pin
gUrM33T11-May-04 3:02
gUrM33T11-May-04 3:02 
GeneralRe: How to make code block works faster? Pin
Kolich11-May-04 3:05
Kolich11-May-04 3:05 
GeneralRe: How to make code block works faster? Pin
gUrM33T11-May-04 3:15
gUrM33T11-May-04 3:15 
GeneralRe: How to make code block works faster? Pin
gUrM33T11-May-04 3:23
gUrM33T11-May-04 3:23 
GeneralRe: How to make code block works faster? Pin
Kolich11-May-04 3:24
Kolich11-May-04 3:24 
GeneralRe: How to make code block works faster? Pin
toxcct11-May-04 4:59
toxcct11-May-04 4:59 
AnswerRe: How to make code block works faster? Pin
David Crow11-May-04 3:15
David Crow11-May-04 3:15 
GeneralRe: How to make code block works faster? Pin
Tim Smith11-May-04 3:44
Tim Smith11-May-04 3:44 
AnswerRe: How to make code block works faster? Pin
Diddy11-May-04 3:24
Diddy11-May-04 3:24 
GeneralRe: How to make code block works faster? Pin
Kolich11-May-04 3:28
Kolich11-May-04 3:28 
AnswerRe: How to make code block works faster? Pin
Tim Smith11-May-04 3:48
Tim Smith11-May-04 3:48 
GeneralRe: How to make code block works faster? Pin
Antony M Kancidrowski12-May-04 2:42
Antony M Kancidrowski12-May-04 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.