goto

S

Samee Zahur

right...sorry I mixed it up. "break 2" would need a goto beyond the end
of loops, while "continue 2" would need goto just before the end of
loops. Thanks for the correction. But no one still seems to be telling
me anything about the scope of these labels... do I get to use the same
name in different functions?

Samee
 
M

m_schellens

Same goto label in different functions is definitey ok.
As you cannot goto inside a block from outside, same labels in
different blocks could be ok, but I don't know what the
standard says.
HDH,
marc
 
R

Ron Natalie

Same goto label in different functions is definitey ok.
As you cannot goto inside a block from outside, same labels in
different blocks could be ok, but I don't know what the
standard says.

You can goto inside a block from outside, as long as you don't
cross any initializations. You can't goto across functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,665
Latest member
salkete

Latest Threads

Top