• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Thanx for helping me! Another newbie question inside.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Thanx for helping me! Another newbie question inside.


  • Subject: Thanx for helping me! Another newbie question inside.
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 21 Aug 2001 14:59:18 +0200

Thanks

for answering!
int myStringLength=[myString length] works as exspected.
Well, I'm running into new trouble.

I'd like to declare and use a function inside my action. Just to avoid
redundancy.
- (IBAction)click:(id)sender
{
... my weird bunch of code
}


By example a function for square root.

In PHP this is done by:
function squareRoot ($arg) {
return $arg*$arg;
}

and can be called like:
$sq=squareRoot(2);

How do I declare this in Objective-C?

In case this is the most stupid question of the month, please tell me where
I can found a more "basic style" introduction in Objective C.

TIA,
Martin


  • Follow-Ups:
    • Re: Thanx for helping me! Another newbie question inside.
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: PB launching wrong app after build
  • Next by Date: Re: Thanx for helping me! Another newbie question inside.
  • Previous by thread: Re: PB launching wrong app after build
  • Next by thread: Re: Thanx for helping me! Another newbie question inside.
  • Index(es):
    • Date
    • Thread