Go to Post By the way, a piece of advice to all those who haven't gone to Manchester for Kickoff before: Go. It's something you have to do at least once in your time in FIRST. - Billfred [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2007, 11:09
buddy.smith buddy.smith is offline
Master Control
FRC #1795
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: atlanta
Posts: 20
buddy.smith is an unknown quantity at this point
Re: old style functions??

Why don't you post the code?

Here's an "old style" function declaration:
Code:
int myFunc( param1, param2, param3)
     char param1;
     int param2;
     short param3;
{
     printf("Got %d %d %d\n", param1, param2, param3);
}
Here's a "new style" function declaration:
Code:
int myFunc( char param1, int param2, short param3 )
{
    .....
}
(edited for correctness, as pointed out below)

Last edited by buddy.smith : 20-02-2007 at 14:25.
  #2   Spotlight this post!  
Unread 20-02-2007, 11:43
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: old style functions??

Quote:
Originally Posted by buddy.smith View Post
Why don't you post the code?

Here's an "old style" function declaration:
Code:
int myFunc( param1, param2, param3)
{
     char param1;
     int param2;
     short param3;
     printf("Got %d %d %d\n", param1, param2, param3);
}
Close, for "old style" function declarations the parameters went between the ) and the {:

Code:
int myFunc( param1, param2, param3)
     char param1;
     int param2;
     short param3;
{
     printf("Got %d %d %d\n", param1, param2, param3);
}
Usually you get this error when the { character has been omitted.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Camera functions. winners Programming 1 21-01-2006 19:42
Source for old style CIM motor (fr801-001) Rob Motors 9 09-01-2006 09:31
Bringing Back the Old School...picture style Greg Needel Chit-Chat 1 19-10-2005 13:20
Auton + Functions ten3brousone Programming 0 27-02-2005 20:11
Old Delph Ide Style? INF3RN0666 Programming 6 14-06-2003 08:56


All times are GMT -5. The time now is 04:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi