Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Limit on length of string returned from GETARG?

a_leonard
Novice
670 Views

Is there a maximum length of the character variable "buffer" in the intrinsic routine GETARG?

CALL GETARG(n,buffer[,status])

I am making a call with the variable "buffer" defined with len=255.  When I try to get an argument with > 133 characters, I only get the first 133.  The return value of staus is 133.

0 Kudos
2 Replies
Steven_L_Intel1
Employee
670 Views

I can't reproduce this - I just tried an argument of 140 characters and got all 140. I looked at the code for GETARG and saw nothing that limits the length.

0 Kudos
a_leonard
Novice
670 Views

Oops.  User error.  A space snuck into my long command line argument, which of course made it two arguments.

0 Kudos
Reply