1
   

Geeky C Question - What is a old-style formal list ?

 
 
Reply Fri 18 Nov, 2005 07:41 pm
When I make this mistake in C programming:
void myF(); //Extra semi colon here
{
printf("hello");
}

I get this error in MSVC:

error C2447: '{' : missing function header (old-style formal list?)

WTF is a old-style formal list ? What did the syntax use to be? I was under the impression C syntax hasn't changed for a quite while. No other syntax errors give you this kind of error message.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 3,762 • Replies: 1
No top replies

 
nighthawk
 
  1  
Reply Sat 19 Nov, 2005 07:45 am
a quick google search reveals this post:

Quote:

BTW, that "old-style formal list" is from ancient K&R * syntax in which a function would be declare something like this (cut me some slack, guys, I'm doing this from memory):
double Total_SA(r, h);
double r;
double h;
{
return 2*PI*r*(r+h);
}
You'll never use this old syntax, but there's still a lot of old source code floating around on the Web that use it, so you just might encounter it one day and when you do you'll need to know how to correct it.

[* Footnote: K&R == "Kernighan & Ritchie", the designers of C and authors of "The C Programming Language". The second edition does conform to ANSI C standards.



Full post:
http://forums.devshed.com/archive/t-296162/error-C2447-missing-function-header-oldstyle-formal-list
0 Replies
 
 

Related Topics

Clone of Micosoft Office - Question by Advocate
Do You Turn Off Your Computer at Night? - Discussion by Phoenix32890
The "Death" of the Computer Mouse - Discussion by Phoenix32890
Windows 10... - Discussion by Region Philbis
Surface Pro 3: What do you think? - Question by neologist
Windows 8 tips thread - Discussion by Wilso
GOOGLE CHROME - Question by Setanta
.Net and Firefox... - Discussion by gungasnake
Hacking a computer and remote access - Discussion by trying2learn
 
  1. Forums
  2. » Geeky C Question - What is a old-style formal list ?
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.06 seconds on 06/05/2024 at 08:54:29