Raised This Month: $ Target: $400
 0% 

Function Prototypes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 03-17-2006 , 01:47   Function Prototypes
Reply With Quote #1

I have read the pawn manual and have seen support for function prototypes, but how can they be implemented in pawn scripts?

are you supposed to call them with a forward? like so?

Code:
// prototype? forward somefunc( var1, var2 ); // then the actual function declared like this? public somefunc( var1, var2 ) {   // ... some code in here   return PLUGIN_HANDLED; }

My script is rather large, and I am having some issues with functions calling other functions or variables before they are defined (i use a multiple file approach already, so the two-parse functionality of pawn does not work).

I would like to start defining prototypes like traditional c-based languages, and just want to know if my syntax above is correct. Thanks.
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
 



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode