Click here to Skip to main content
15,894,410 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 codewitch4-Oct-23 23:31
mvahoney the codewitch4-Oct-23 23:31 
AnswerRe: I'm looking for review in terms of readability, approachability of this code Pin
jschell5-Oct-23 5:28
jschell5-Oct-23 5:28 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
honey the codewitch5-Oct-23 5:30
mvahoney the codewitch5-Oct-23 5:30 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
honey the codewitch5-Oct-23 5:55
mvahoney the codewitch5-Oct-23 5:55 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
k50545-Oct-23 6:35
mvek50545-Oct-23 6:35 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
Gerry Schmitz5-Oct-23 7:54
mveGerry Schmitz5-Oct-23 7:54 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
Richard MacCutchan5-Oct-23 21:46
mveRichard MacCutchan5-Oct-23 21:46 
GeneralRe: I'm looking for review in terms of readability, approachability of this code Pin
jschell6-Oct-23 7:12
jschell6-Oct-23 7:12 
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 
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 
trønderen wrote:
If variables X and Y are defined in a block, must they both be available throughout the lifetime of that block?


Via the spec? No. The spec is just asserting that they are not 'available' outside the block.

In reality, in terms of the compiler emitted code? Probably.

Consider what difficulty the compiler has in determining what the scope of A is in the following. Keep in mind that the code can get much more complex.

{
   int A = 3;
   int *B = &A;
   int **C = &B;
   doit(C);
   
}

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 

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.