Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
honey the codewitch6-Oct-23 7:40
mvahoney the codewitch6-Oct-23 7:40 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
Gerry Schmitz6-Oct-23 11:44
mveGerry Schmitz6-Oct-23 11:44 
QuestionFor loop Pin
Calin Negru25-Sep-23 5:27
Calin Negru25-Sep-23 5:27 
AnswerRe: For loop Pin
Victor Nijegorodov25-Sep-23 5:32
Victor Nijegorodov25-Sep-23 5:32 
GeneralRe: For loop Pin
Calin Negru25-Sep-23 5:42
Calin Negru25-Sep-23 5:42 
AnswerRe: For loop Pin
Randor 25-Sep-23 5:36
professional Randor 25-Sep-23 5:36 
GeneralRe: For loop Pin
jschell25-Sep-23 7:25
jschell25-Sep-23 7:25 
QuestionRe: For loop Pin
Randor 25-Sep-23 7:48
professional Randor 25-Sep-23 7:48 
jschell wrote:
C, so before C++, would limit the scope to the method.
No, C89, C90 through until C98 had method scope.

jschell wrote:
So if one has 3 for loops in one method with each in a block for a if statement, the compiler might or might not have limited it to the block.

The ISO standards are listed at the bottom of this page. Could you point out what you are referring to?

I see what you are saying now. You are describing old C89 rules. Are you an embedded C programmer? Those scope rules were changed way back in 1999.

Yeah, modern compilers don't have method scope at all anymore. Some embedded compilers still do C89

modified 25-Sep-23 14:04pm.

AnswerRe: For loop Pin
jschell26-Sep-23 5:10
jschell26-Sep-23 5:10 
GeneralRe: For loop Pin
Randor 26-Sep-23 5:38
professional Randor 26-Sep-23 5:38 
GeneralRe: For loop Pin
jschell27-Sep-23 5:23
jschell27-Sep-23 5:23 
JokeRe: For loop Pin
Randor 27-Sep-23 6:57
professional Randor 27-Sep-23 6:57 
GeneralRe: For loop Pin
trønderen28-Sep-23 13:50
trønderen28-Sep-23 13:50 
GeneralRe: For loop Pin
jschell29-Sep-23 11:07
jschell29-Sep-23 11:07 
GeneralRe: For loop Pin
trønderen29-Sep-23 11:35
trønderen29-Sep-23 11:35 
GeneralRe: For loop Pin
Randor 29-Sep-23 12:04
professional Randor 29-Sep-23 12:04 
GeneralRe: For loop Pin
jschell2-Oct-23 5:09
jschell2-Oct-23 5:09 
GeneralRe: For loop Pin
Randor 2-Oct-23 5:47
professional Randor 2-Oct-23 5:47 
GeneralRe: For loop Pin
trønderen2-Oct-23 8:01
trønderen2-Oct-23 8:01 
GeneralRe: For loop Pin
Randor 2-Oct-23 8:27
professional Randor 2-Oct-23 8:27 
GeneralRe: For loop Pin
trønderen2-Oct-23 12:17
trønderen2-Oct-23 12:17 
GeneralRe: For loop Pin
Randor 2-Oct-23 12:54
professional Randor 2-Oct-23 12:54 
GeneralRe: For loop Pin
trønderen2-Oct-23 21:11
trønderen2-Oct-23 21:11 
GeneralRe: For loop Pin
Randor 3-Oct-23 0:08
professional Randor 3-Oct-23 0:08 
GeneralRe: For loop Pin
trønderen3-Oct-23 9:54
trønderen3-Oct-23 9:54 

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.