Click here to Skip to main content
15,890,043 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: it's the same code! isn't it? Pin
Kris Lantz18-Mar-22 4:31
professionalKris Lantz18-Mar-22 4:31 
GeneralRe: it's the same code! isn't it? Pin
englebart18-Mar-22 5:37
professionalenglebart18-Mar-22 5:37 
GeneralRe: it's the same code! isn't it? Pin
honey the codewitch18-Mar-22 5:40
mvahoney the codewitch18-Mar-22 5:40 
GeneralRe: it's the same code! isn't it? Pin
englebart18-Mar-22 5:49
professionalenglebart18-Mar-22 5:49 
GeneralRe: it's the same code! isn't it? Pin
honey the codewitch18-Mar-22 7:14
mvahoney the codewitch18-Mar-22 7:14 
GeneralRe: it's the same code! isn't it? Pin
jmaida18-Mar-22 6:17
jmaida18-Mar-22 6:17 
GeneralRe: it's the same code! isn't it? Pin
honey the codewitch18-Mar-22 7:15
mvahoney the codewitch18-Mar-22 7:15 
GeneralRe: it's the same code! isn't it? Pin
trønderen18-Mar-22 8:03
trønderen18-Mar-22 8:03 
I was studying some code for an 8051, containing a test 'if (x > y)' and 2-3 statements to calculate a value, followed by an 'else' calculating the same value, but doing the partial expressions in a different order. I spent several hours trying to find the difference between the 'if' and 'else' clauses - mathematically they were identical.

In math, 'sign extension' is a non-issue. In 8051 it is a real issue. y < x would lead to a sign extension in one partial expression that would lead to the wrong result in the 'if' clause. With x > y would see the same in another partial expression in the 'else' clause'.

Obviously, there was not a single trace of any comment in the code. C code is 'self-documenting'. After seeing the light, I mentioned it to the guy who had programmed it. He just shrugged: 'That's how 8051 is!' Sort of saying 'if you want any comment to explain this, ask the 8051 to write it'.
GeneralRe: it's the same code! isn't it? Pin
honey the codewitch18-Mar-22 8:09
mvahoney the codewitch18-Mar-22 8:09 
GeneralRe: it's the same code! isn't it? Pin
jmaida18-Mar-22 12:24
jmaida18-Mar-22 12:24 
GeneralRe: it's the same code! isn't it? Pin
Eddy Vluggen18-Mar-22 13:18
professionalEddy Vluggen18-Mar-22 13:18 
GeneralRe: it's the same code! isn't it? Pin
honey the codewitch18-Mar-22 13:39
mvahoney the codewitch18-Mar-22 13:39 
GeneralRe: it's the same code! isn't it? Pin
Eddy Vluggen18-Mar-22 13:50
professionalEddy Vluggen18-Mar-22 13:50 
GeneralRe: it's the same code! isn't it? Pin
honey the codewitch18-Mar-22 14:03
mvahoney the codewitch18-Mar-22 14:03 
GeneralRe: it's the same code! isn't it? Pin
Eddy Vluggen18-Mar-22 14:27
professionalEddy Vluggen18-Mar-22 14:27 
GeneralRe: it's the same code! isn't it? Pin
Sander Rossel19-Mar-22 3:07
professionalSander Rossel19-Mar-22 3:07 
GeneralRe: it's the same code! isn't it? Pin
Slow Eddie19-Mar-22 5:06
professionalSlow Eddie19-Mar-22 5:06 
GeneralRe: it's the same code! isn't it? Pin
Andreas Mertens21-Mar-22 5:45
professionalAndreas Mertens21-Mar-22 5:45 
GeneralRe: it's the same code! isn't it? Pin
englebart21-Mar-22 14:49
professionalenglebart21-Mar-22 14:49 
GeneralRe: it's the same code! isn't it? Pin
Mark Miller21-Mar-22 6:18
Mark Miller21-Mar-22 6:18 
GeneralRe: it's the same code! isn't it? Pin
honey the codewitch21-Mar-22 6:47
mvahoney the codewitch21-Mar-22 6:47 
GeneralCan MS Teams ring phone on external speaker when headset connected? Pin
Craig Robbins18-Mar-22 4:53
Craig Robbins18-Mar-22 4:53 
GeneralRe: Can MS Teams ring phone on external speaker when headset connected? Pin
Kris Lantz18-Mar-22 2:49
professionalKris Lantz18-Mar-22 2:49 
GeneralRe: Can MS Teams ring phone on external speaker when headset connected? Pin
Craig Robbins18-Mar-22 3:15
Craig Robbins18-Mar-22 3:15 
GeneralRe: Can MS Teams ring phone on external speaker when headset connected? Pin
englebart18-Mar-22 5:43
professionalenglebart18-Mar-22 5:43 

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.