BladeSystem Forums have moved here
To make BladeSystem information easier to find, we have moved the BladeSystem forums here, to Servers and Operating Systems.
Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

FORTRAN system routine

Go to Solution
Occasional Contributor

FORTRAN system routine


I have a sneaking suspicion that the FORTRAN system routine only accepts character strings of a fixed length (like 40 or 80) although in all of the documentation I've read says nothing about it.

If anyone has had problems with the routine or has any tricks of the trade I'd love to hear them; I'm a new programmer and I need all the tricks I can get!

Acclaimed Contributor

Re: FORTRAN system routine

Most implementations of the 3F system() function impose a 1023 character maximum length limit on the string. I suspect your problem is that you are not appending a NUL just past the last significant character.
If it ain't broke, I can fix that.
Esteemed Contributor

Re: FORTRAN system routine

The man page for system(3f) says:

String can not be longer than NCARGS-50
characters, as defined in .

On my machine (HPUX 11.22, f90 2.8.6) NCARGS
appears to be 2048000. Check your value of