Click here to Skip to main content
15,914,074 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: Gawd, I hate Sony right now... Pin
Rajesh R Subramanian29-Jun-16 17:49
professionalRajesh R Subramanian29-Jun-16 17:49 
QuestionON ERROR RESUME NEXT Pin
DaveAuld29-Jun-16 5:38
professionalDaveAuld29-Jun-16 5:38 
AnswerRe: ON ERROR RESUME NEXT Pin
jeron129-Jun-16 5:41
jeron129-Jun-16 5:41 
AnswerRe: ON ERROR RESUME NEXT Pin
den2k8829-Jun-16 5:44
professionalden2k8829-Jun-16 5:44 
GeneralRe: ON ERROR RESUME NEXT Pin
Sander Rossel29-Jun-16 21:18
professionalSander Rossel29-Jun-16 21:18 
GeneralRe: ON ERROR RESUME NEXT Pin
den2k8829-Jun-16 21:28
professionalden2k8829-Jun-16 21:28 
GeneralRe: ON ERROR RESUME NEXT Pin
Sander Rossel29-Jun-16 21:41
professionalSander Rossel29-Jun-16 21:41 
GeneralRe: ON ERROR RESUME NEXT Pin
den2k8829-Jun-16 21:58
professionalden2k8829-Jun-16 21:58 
You're absolutely right about the huge nested ifs, I usually tend to modularize a lot and where multiple checks are involved I use a SEQUENCE of if and a cumulative status, so that it becomes
C++
bool keep_going = true;
if (error_cond1) keep_going = false;
if (keep_going && error_cond2) keep_going = false;
...

It's easier to read and modify, also it's not mandatory to have a single cumulative status. Since I work with stdcalls, VB6 and plain old C code on old compilers (long story short: we can't change.) I can't reliably use exceptions outside the deepest functions and being the VS6 stdlib what it is I don't really need them since it's better to stick to CRT functions, which don't have exceptions. Being VS6 CRT what it is many "safe" functions that use SEH exceptions do not exist so I don't use them either.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X

If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver

When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

GeneralRe: ON ERROR RESUME NEXT Pin
firegryphon30-Jun-16 7:42
firegryphon30-Jun-16 7:42 
GeneralRe: ON ERROR RESUME NEXT Pin
obermd30-Jun-16 16:57
obermd30-Jun-16 16:57 
GeneralRe: ON ERROR RESUME NEXT Pin
SeattleC++30-Jun-16 10:28
SeattleC++30-Jun-16 10:28 
AnswerRe: ON ERROR RESUME NEXT Pin
OriginalGriff29-Jun-16 5:45
mveOriginalGriff29-Jun-16 5:45 
GeneralRe: ON ERROR RESUME NEXT Pin
Gerry Schmitz30-Jun-16 6:49
mveGerry Schmitz30-Jun-16 6:49 
JokeRe: ON ERROR RESUME NEXT Pin
Ian Shlasko29-Jun-16 5:55
Ian Shlasko29-Jun-16 5:55 
JokeRe: ON ERROR RESUME NEXT Pin
Richard Deeming29-Jun-16 6:06
mveRichard Deeming29-Jun-16 6:06 
GeneralRe: ON ERROR RESUME NEXT Pin
jeron129-Jun-16 6:14
jeron129-Jun-16 6:14 
GeneralRe: ON ERROR RESUME NEXT Pin
Mark_Wallace29-Jun-16 11:10
Mark_Wallace29-Jun-16 11:10 
AnswerRe: ON ERROR RESUME NEXT Pin
Eddy Vluggen29-Jun-16 6:16
professionalEddy Vluggen29-Jun-16 6:16 
GeneralRe: ON ERROR RESUME NEXT Pin
Richard Deeming29-Jun-16 6:36
mveRichard Deeming29-Jun-16 6:36 
GeneralRe: ON ERROR RESUME NEXT Pin
Eddy Vluggen29-Jun-16 6:53
professionalEddy Vluggen29-Jun-16 6:53 
GeneralRe: ON ERROR RESUME NEXT Pin
OriginalGriff29-Jun-16 8:00
mveOriginalGriff29-Jun-16 8:00 
GeneralRe: ON ERROR RESUME NEXT Pin
Mark_Wallace29-Jun-16 11:12
Mark_Wallace29-Jun-16 11:12 
GeneralRe: ON ERROR RESUME NEXT Pin
Stephen Hewitt29-Jun-16 6:42
Stephen Hewitt29-Jun-16 6:42 
GeneralRe: ON ERROR RESUME NEXT Pin
Larry Gibson30-Jun-16 4:42
Larry Gibson30-Jun-16 4:42 
GeneralRe: ON ERROR RESUME NEXT Pin
jediYL30-Jun-16 16:11
professionaljediYL30-Jun-16 16:11 

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.