Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1738: no function declarations within functions

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
.oisyn Posted - Feb 04 2010 : 10:21:22 AM
void Foo()
{
    void Bar();
    Bar();
}

void Bar()
{
}

VAX doesn't understand the declaration of Bar() in Foo(), and that it refers to the Bar() definition further down. It also colors Bar like a variable. Moving the Bar() declaration outside of Foo() makes things work normally again. The C++ standard says that a function declaration within a function declares the function in the enclosing namespace, but is only visible in the current scope.

Also fails in the 1810 beta btw.
3   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jul 20 2011 : 01:55:09 AM
case=25957 is fixed in build 1854
.oisyn Posted - Feb 04 2010 : 5:21:38 PM
No, not usually. I had to make a quick hack for debugging purposes and so I found out :)
accord Posted - Feb 04 2010 : 2:38:27 PM
I am seeing the same effect here. Thank you for the clear description.

case=25957

Out of interest, do you use local function declarations?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000