Click here to Skip to main content
15,904,024 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: Wordle 1,058 - 3 4 me Pin
pkfox11-May-24 20:44
professionalpkfox11-May-24 20:44 
GeneralRe: Wordle 1,058 Pin
Cp-Coder11-May-24 22:33
Cp-Coder11-May-24 22:33 
GeneralRe: Wordle 1,058 Pin
Sander Rossel12-May-24 0:32
professionalSander Rossel12-May-24 0:32 
GeneralRe: Wordle 1,058 Pin
Amarnath S12-May-24 2:40
professionalAmarnath S12-May-24 2:40 
GeneralRe: Wordle 1,058 Pin
StarNamer@work12-May-24 13:29
professionalStarNamer@work12-May-24 13:29 
GeneralThere are many gotos, but these ones are mine PinPopular
honey the codewitch11-May-24 15:23
mvahoney the codewitch11-May-24 15:23 
GeneralRe: There are many gotos, but these ones are mine PinPopular
Ravi Bhavnani11-May-24 15:56
professionalRavi Bhavnani11-May-24 15:56 
GeneralRe: There are many gotos, but these ones are mine Pin
k505412-May-24 4:00
mvek505412-May-24 4:00 
Ravi Bhavnani wrote:
And most (I suspect all) modern compilers won't allow specifying the target of a goto into another block


Not exactly sure what you mean here, but C/C++ certainly allows you to goto into a contained block, or to a label in another code block within the same containing block e.g.
C
void f(int n)
{
    if(n > 1)
      goto foo;
      // do stuff
     if( ... )
     {
        // some stuff
        if ( ... )
            goto foo;     // jumps down to inside next if block
        // other stuff
     } 
     if(  ... )
     {
       foo:
       // do more stuff
     }
} 
Will compile just fine. You can get a warnings if you have an initialization before label foo, with the right warning options (gcc/clang, at least), but a quick perusal of the warning options doesn't seem to suggest that there's a warning for a goto int a contained block.

But maybe you meant that you can't jump from one block to another, like
C++
void foo()
{
   foo_label:
   // ...
}

void bar()
{
   // ...
   goto foo_label;  // invalid non-local goto
}
But for that you have setjmp/longjmp, which, of course, should be avoided like the plague.
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

GeneralRe: There are many gotos, but these ones are mine Pin
Ravi Bhavnani12-May-24 6:05
professionalRavi Bhavnani12-May-24 6:05 
GeneralRe: There are many gotos, but these ones are mine Pin
honey the codewitch12-May-24 8:37
mvahoney the codewitch12-May-24 8:37 
GeneralRe: There are many gotos, but these ones are mine Pin
jmaida12-May-24 14:46
jmaida12-May-24 14:46 
GeneralRe: There are many gotos, but these ones are mine Pin
Daniel Will13-May-24 17:09
Daniel Will13-May-24 17:09 
GeneralRe: There are many gotos, but these ones are mine Pin
Amarnath S11-May-24 17:02
professionalAmarnath S11-May-24 17:02 
GeneralRe: There are many gotos, but these ones are mine Pin
trønderen11-May-24 17:40
trønderen11-May-24 17:40 
GeneralRe: There are many gotos, but these ones are mine Pin
honey the codewitch11-May-24 18:01
mvahoney the codewitch11-May-24 18:01 
GeneralRe: There are many gotos, but these ones are mine Pin
trønderen12-May-24 8:15
trønderen12-May-24 8:15 
GeneralRe: There are many gotos, but these ones are mine Pin
honey the codewitch12-May-24 8:28
mvahoney the codewitch12-May-24 8:28 
GeneralRe: There are many gotos, but these ones are mine Pin
honey the codewitch12-May-24 13:56
mvahoney the codewitch12-May-24 13:56 
GeneralRe: There are many gotos, but these ones are mine Pin
den2k8812-May-24 23:08
professionalden2k8812-May-24 23:08 
GeneralRe: There are many gotos, but these ones are mine Pin
trønderen13-May-24 0:17
trønderen13-May-24 0:17 
GeneralRe: There are many gotos, but these ones are mine Pin
giulicard13-May-24 6:59
giulicard13-May-24 6:59 
GeneralRe: There are many gotos, but these ones are mine Pin
honey the codewitch13-May-24 9:21
mvahoney the codewitch13-May-24 9:21 
GeneralRe: There are many gotos, but these ones are mine Pin
giulicard13-May-24 10:03
giulicard13-May-24 10:03 
GeneralRe: There are many gotos, but these ones are mine Pin
honey the codewitch13-May-24 10:04
mvahoney the codewitch13-May-24 10:04 
GeneralRe: There are many gotos, but these ones are mine Pin
giulicard13-May-24 10:07
giulicard13-May-24 10:07 

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.