Portability (cont)
Goal of portability: write code once, run it anywhere
(sounds familiar?)
Interpreted languages (e.g. Java,Perl,PHP) make this "easy".
(at the cost of porting the interpreter to each new platform)
But even for interpreted systems ...
- file-name conventions differ from system to system
C:\User\Jas\Documents\blah.tex vs /home/jas/docs/blah.tex
|
- some facilities/libraries may not exist on all platforms
(e.g. one system has a particular graphics library, another doesn't)
- interpreters for "standard" languages may vary
(e.g. SQL dialects, Web browser scripting languages)
Such variations can be handled by checks for environment in the code,
if the language supports conditional execution ...
|