Laserfiche WebLink
CRDSS <br />TASK MEMORANDUM 1.05-28 <br />Study of System Integration Issues <br />Software - Portability Issues <br />1.0 ISSUE <br />Software developed as part of the CRDSS must adhere to accepted standards in order to result in a <br />well-supported product and to facilitate future implementation on other platforms. The following <br />issues need to be addressed related to software portability: <br />How can source code be made portable? <br />? <br />How can graphics be made portable? <br />? <br />How can data files be made portable? <br />? <br />2.0 DISCUSSION/ANALYSIS <br />Implementing a system that has portable software and data can often be accomplished by adhering to <br />existing standards and by avoiding the use of system-dependent extensions (even if they may make a <br />development effort easier at times). <br />Source Code Portability <br />Source code that is developed for the CRDSS will adhere to ANSI C, C++ (draft) a nd FORTRAN 77 <br />standards. The ANSI FORTRAN 90 standard has been published but is not widely supported by <br />compilers (the SGI compiler is FORTRAN 77). <br />Non-standard routines can be isolated so that porting to a new platform involves changing a single <br />routine rather than many occurrences of calls to the non-standard routine. This is done by writing a <br />"generic" routine that calls the system-specific routine. For example, getting the system time in a <br />FORTRAN program often involves calling a routine that is different on each platform (or for each <br />compiler). The code can be implemented as illustrated in the following example: <br />* main program <br />program main <br />integer now <br />call GetTime ( now ) <br />stop <br />end <br />* subroutine to get time <br />subroutine GetTime ( now ) <br />integer now <br />* call system-dependent routine to return time <br />call time ( now ) <br />return <br />end <br />1 <br />A275 05.10.94 1.05-28 Malers <br />