- Joined
- Mar 17, 2009
- Messages
- 1,350
Well, I don't know how many of you know C++. But one nice feature is the "prototype" feature. Although not an essential feature, but allows us to code in much neater and less restricted manner.
What a prototype allows us to do is to announce a function - by defining it's name and parameter types - without actually defining the function in the first place.
Then somewhere later in the code, one would define the function.
Ex:
Anyways, the purpose of this thred:
What a prototype allows us to do is to announce a function - by defining it's name and parameter types - without actually defining the function in the first place.
Then somewhere later in the code, one would define the function.
Ex:
Code:
struct example {
void PrintString(string);
};
//then somwhere later in the code, even outside the struct
void example::PrintString(string s)
{
cout << "The string is: " << s;
}
Anyways, the purpose of this thred:
I wonder if you people think it would be a nice idea having prototypes in vJass. I think it'll make coding MUCH NEATER and codes easier to work with and edit.
Maybe if you agree with me we could then let Vexorian know about this idea and hope he would implement it.
Maybe if you agree with me we could then let Vexorian know about this idea and hope he would implement it.