Program Portability (code portability)

This is a discussion on Program Portability (code portability) within the C++ Programming forums, part of the General Programming Boards category; What is program portability (code portanbility) I figured that it is code that can be compiled and run under more ...

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    70

    Program Portability (code portability)

    What is program portability (code portanbility)

    I figured that it is code that can be compiled and run under more than one OS, the reason i am asking this is because i am starting off in OS dev, and i want to know, if i made a C/C++ compiler, could i compile any code with it (i use Windows XP)that doesn't use the windows.h header file??

    If not then....ffffuuuuuuuuuuuu.....(u get the idea)

    Please help.

  2. #2
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    >> I figured that it is code that can be compiled and run under more than one OS

    Sort of. There's no such thing as 'Program Portability' (no, not even Java programs count - they're interpreted). There's a thing called 'Code portablilty' that refers to the ability to compile and run the same code on multiple OS's.

    >>
    could i compile any code with it (i use Windows XP)that doesn't use the windows.h header file??
    <<

    If the host machine has the correct library's, yes.
    Please direct all complaints regarding this post to the nearest brick wall Have a nice day.

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    There are several interpretations of portability. One interpretation is that compiled code (binaries) can be run on more than one platform.

    Another interpretation is that source code can be compiled on one than more platform without making adaptations to it. If you write a C++ code on platform X and if the same code can be compiled without making adaptation ons platform Y, then the code is portable. To reach the goal of writing portable code, the code should be conform the standard and also the used compilers should be. Note that most compilers, if not all, are not conform the standard!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with my morse code program
    By justin87 in forum C++ Programming
    Replies: 1
    Last Post: 10-21-2007, 05:23 PM
  2. Need help on code to execute the program
    By hibmem10 in forum C++ Programming
    Replies: 6
    Last Post: 12-24-2005, 12:42 PM
  3. prime number program code
    By jd7joe in forum C++ Programming
    Replies: 1
    Last Post: 11-17-2005, 09:14 AM
  4. Please test my program: Code Black
    By PhoenixC++ in forum Windows Programming
    Replies: 15
    Last Post: 04-29-2004, 07:18 PM
  5. Replies: 5
    Last Post: 04-17-2003, 07:07 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21