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

Compaq Array Visualizer error code

eric_petersen
Beginner
766 Views
0 Kudos
5 Replies
sumitm
Beginner
766 Views
I think it should also include the path name for example
call faglSaveAsFile(m_A,'c: est.agl',status)
Please try that and see if you get an error. It works for me.
0 Kudos
eric_petersen
Beginner
766 Views
Thanks. While verifying that av_filename was in fact a full pathname, I noticed that av_filename (declared as CHARACTER*(512)) had a large number of trailing blanks. On trimming these, the code works fine:

call faglSaveAsFile (M, trim(av_filename), status)

Too bad the error message wasn't more useful.

Thanks again,
Eric
0 Kudos
Jugoslav_Dujic
Valued Contributor II
766 Views
Since av_filename is probably a C-style string, the only reliable way is to use trim(av_filename)//char(0).

Jugoslav
0 Kudos
durisinm
Novice
766 Views
Jugoslav,

I've seen you mention C-style strings in other topic threads. How is a person to know when he's dealing with a C-style string terminated with a null when calling a function or subroutine or not?

Mike
0 Kudos
Jugoslav_Dujic
Valued Contributor II
766 Views
Well, all standard Fortran routines (DFLIB, DFPORT, intrinsics) use standard Fortran strings (fixed-length, no termination) except where stated otherwise in the docs (e.g. APPENDMENUQQ). On the other hand, all DFWIN (Windows API) routines use C-style strings (CHAR(0)-terminated).

As for other routines, such as Array Viewer ones, there's no 100% way to know except to consult the documentation. Another way is to inspect contents of appropriate .lib and take a look at the exported symbol - STDCALL routines have @n appended at the end, where n is number of arguments*4; if that number is greater than number of arguments in documentation, it's probably a Fortran-style string (hidden character length passed as additional argument).

I've just inspected AVIEW160.lib and saw that faglSaveAsFile is @16, indicating that string length is passed. Thus, my advice was wrong; it seems that it's just a bug in faglSaveAsFile -- they forgot to TRIM the filename argument.

Jugoslav
0 Kudos
Reply