answersLogoWhite

0


Best Answer

Portability is a characteristic attributed to a computer program if it can be used in an operating systems other than the one in which it was created without requiring major rework. Porting is the task of doing any work necessary to make the computer program run in the new environment. In general, programs that adhere to standard program interfaces such as the X/Open Unix 95 standard C language interface are portable. Ideally, such a program needs only to be compiled for the operating system to which it is being ported. However, programmers using standard interfaces also sometimes use operating system extensions or special capabilities that may not be present in the new operating system. Uses of such extensions have to be removed or replaced with comparable functions in the new operating system. In addition to language differences, porting may also require data conversion and adaptation to new system procedures for running an application. Portability has usually meant some work when moving an application program to another operating system. Recently, the Java programming language and runtime environment has made it possible to have programs that run on any operating system that supports the Java standard (from Sun Microsystems) without any porting work. Java applets in the form of precompiled bytecode can be sent from a server program in one operating system to a client program (your Web browser) in another operating system without change.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

16y ago

"Portability" means writing your program (code) in such a way that the same code works on different environments i.e. different processors, different operating systems, different versions of libraries etc. If your program is portable, you should be able to just re-compile it on any new system and it should run without problems. Portability is important because non-portable code causes lots of problems in maintenance - managing multiple versions, poor readability / understandability of the code to name a few. Any good programming book will give guidelines on how to write portable code - avoiding hard-coding, judicious use of compiler directives like #ifdef etc. Hope this helps. - Ramki.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Portability simply refers to whether the source code is machine-dependent or not. Machine-dependent code is non-portable code; it is specific to a particular architecture and/or platform. Machine code and assembly language are examples of non-portable languages.

C and C++ are portable languages because the code can be compiled upon any machine to produce the machine-dependant code. However, both can also be used to write non-portable code if desired, thus you can write operating systems, drivers and embedded systems software as well as application software.

Java is fully portable because it compiles to byte code suitable for interpretation by any Java virtual machine implementation. In other words, you program and compile code specific to the virtual machine rather than to the physical machine, and the virtual machine creates the machine-dependant code at runtime. The downside is that Java cannot be used to write machine-dependent code, so it can only be used to write applications software.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is portability?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the benefit of using standard c language functions over windows API function?

Portability.


The ability of higher-level programming languages to create programs that can be moved from one type of computer to another is called?

portability


Address of a float can be assigned to a char?

No. The address of a float can only be assigned to a variable of type pointer to float. Any other (coerced) use is outside of the definition, implementation, and portability of the language.Yes, with typecast, but it is entirely pointless:float f;char c = (char)&f;


Why do you have to get java?

Yes, you can uninstall the Java Runtime Environment from Microsoft Windows. If you are a user with sufficient privileges, you can use the "Add/Remove Programs" control panel to find and remove the "Sun Java" entry. This will not harm your computer.


What are the advantages of using typedef in a program?

1. Readability. Just like naming your variables properly can show how you intend to use the variable, renaming the type can help show how you intend to use all variables of this type. It eliminates the possible bug of incorrect argument ordering (e.g. if a method signature has multiple boolean flags). 2. Portability. On different systems you might want to have the same variable name (because you're using it the same way) to be of a different type. So you keep the typedef in a header file controlled by conditional compilation (for example) for maximal portability. 3. decreases complexity for declaring complex and repeated declarations like typedef unsigned long int UINT64;