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.

Website Feedback

If you would like to see any changes on the current page, feel free to leave us a message.

(If you're a human, don't change the following field)
Your first name.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.