Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29283 Discussions

Limit on length of string returned from GETARG?

a_leonard
Novice
679 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
679 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
679 Views

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

0 Kudos
Reply