Tech Tip: NAGWare f95 Compiler and Posix Functions
The NAGWare f95 Compiler provides access to a large number of Posix system calls. Two popular examples of these are facilities to get command line arguments and the ability to execute operating system commands. Access to the Posix functions is by use of the appropriate built-in module.
In order to find out the number of command line arguments (by calling IARGC) and to get the arguments themselves (by calling GETARG) it is first necessary to use the F90_UNIX_ENV module, e.g.
USE F90_UNIX_ENV, ONLY : IARGC,GETARG
Similarly the SYSTEM routine, which passes a string to the command processor for execution, is in the F90_UNIX_PROC module.
Seven modules providing more than 60 Posix procedures covering directories, files, environment and processes are available. These are fully documented in the manual, on-line and at http://www.nag.co.uk/nagware/np/r50_doc/index.asp.
For specific technical advice in using NAG's products, please contact our technical experts.
Return to Technical Tips & Hints index page.