Re: opening char variable data file



*** Hendrickson <***.hendrickson@xxxxxxx> wrote:

As far as I know I (which isn't very far for UNIX like systems), you
need to terminate character strings with a NULL character. Try
something like
> call system ("more "//file_name_use//ACHAR(0)) (**)
call system ("pwd"//ACHAR(0))

Except that "system" is a Fortran Library procedure (a nonstandard one,
as noted before), so it takes care of that for you. Yes, there is also a
similarly-named C function, but if you are just calling system from
Fortran like that, without any special C interop "funnies", you are
almost surely getting the Fortran one.

This all being nonstandard, there could concievably be implementations
of system that require a trailing null, but if any such exist they are
rare (and I'd call them pretty poor quality implementations).

I uses system regularly. I don't recall ever needing anything like that.
Well, perhaps on some obscure system long in the past, but certainly not
on anything likely to be at issue today.

Looks to me like GT's main problems are just the simple matter of
stripping quotes. I think he is getting all tied up in lots of
irrelevancies that just confuse the matter. All he needs to do is strip
the quotes for his OPEN (or inquire). This has been mentioned (multiple
times) before, but I'm not sure it is getting through.

Stripping quotes is trivial, but I'm not feeling like writing sample
code for it right now. One might want to include a check to see whether
the string had quotes or not.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.