Re: Yet another stupid question...
Re: Yet another stupid question...
- Subject: Re: Yet another stupid question...
- From: Markus Hitter <email@hidden>
- Date: Thu, 6 Dec 2001 19:02:52 +0100
Am Donnerstag den, 6. Dezember 2001, um 16:56, schrieb Martin Kautz:
function addvalues ($arg1, $arg2) {
return $arg1+$arg2;
}
What I don't understand is the syntax in Obj-C...
In Obj-C you'd ask Object "arg1" to add Object "arg2" to its
self. That would be:
sum = [arg1 addValue:arg2];
or, for your other example:
sum = [2 addValue:3];
Please note: "int" isn't an object but an plain C type. You'd
have to use NSNumber or similar.
Usually there is no need to have such simple objects. Plain C
will do fine and is to be preferred in such cases.
Cheers,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/