09.11.2010, 19:37
Was just testing the "new writing style".
Код:
private function String::ToInteger(const string[]) private function String::Copy(const string[], destination[]) private function Integer::ToString(int) private function bool:Integer::ToBoolean(int)
pawn Код:
#define String:: str_
#define Integer:: int_
#define function
#define private static stock
private function String::ToInteger(const string[]) {
return strval(string);
}
private function String::Copy(const string[], destination[]) {
for(new i=0; i < strlen(string); ++i) destination[i] = string[i];
}
private function Integer::ToString(int) {
new output[32]; format(output, sizeof(output), "%i", int); return output;
}
private function bool:Integer::ToBoolean(int) {
return (int > 0) ? (true) : (false);
}