• 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
clean up code (sorry for being stupid)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

clean up code (sorry for being stupid)


  • Subject: clean up code (sorry for being stupid)
  • From: "email@hidden" <email@hidden>
  • Date: Wed, 22 Aug 2001 09:08:31 +0200

Hello,

I wrote a little program which currently use a single source file
(Controller.m) and it's header file (Controller.h)

Controller.m is using a single construct like (is it a class or method or
something?) This is wired to a button, of course.

@implementation
- (IBAction)click:(id) sender
{
... (about 500 lines of Objective-C)
}
@end

The program is running fine, howevever I'd like to clean up my code a little
to avoid redundancy. So I want to declare some functions with arguments and
return values. Unfortunately all my tries to declare a function here is
driving the preprocessor nuts... :-/ Is it possible to declare a function
inside the construct above? Or do I need to declare functions externally?
Could someone post a little snippet to show me the right syntax?

TIA,
Martin


  • Follow-Ups:
    • Re: clean up code (sorry for being stupid)
      • From: Ondra Cada <email@hidden>
    • Re: clean up code (sorry for being stupid)
      • From: email@hidden (Farl)
  • Prev by Date: Re: Sheet interferes with close widget and app quit
  • Next by Date: Re: clean up code (sorry for being stupid)
  • Previous by thread: Re: Learn Programming by Electro-Shock stimulation!
  • Next by thread: Re: clean up code (sorry for being stupid)
  • Index(es):
    • Date
    • Thread