Amazon.com Widgets Import statement in a test file
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 19, 2013, 05:24:04 PM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Help!!!
| | |-+  Import statement in a test file
Pages: [1]   Go Down
Print
Author Topic: Import statement in a test file  (Read 427 times)
KinAZ
Newbie
*
Posts: 17






« on: June 16, 2009, 05:49:19 PM »

Hi,
  I'm just curious. Why isn't the implementation file directly imported into a test file? The implementation file contains all of the nitty gritty definitions of variables and methods - both of which the test file needs to execute successfully. What's the point of directly importing only the header file, the fluff so to speak, into the test file?
Logged
skochan
Administrator
Hero Member
*****
Posts: 3109







« Reply #1 on: June 16, 2009, 05:58:34 PM »

As you know, the implementation file contains the code.  That's combined with the test program when your file is "loaded" or "linked."  Typically, the code for your classes may be put into a system library (such as is  the case with the framework classes) and can be extracted from the library during this link edit phase.  In that way, only the code that is actually used by your program needs to be put into your final executable.  Plus it allows the code for classes (again, as is the case  for the framework classes) to be shared among programmers simply by having them all link with the appropriate library.

Cheers,

Steve Kochan
Logged
KinAZ
Newbie
*
Posts: 17






« Reply #2 on: June 16, 2009, 09:17:08 PM »

Ahhh. Thanks!
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.