Re: .true. help



On May 30, 6:07 am, rudra <bnrj.ru...@xxxxxxxxx> wrote:
On May 30, 5:47 am, Alois Steindl <Alois.Stei...@xxxxxxxxxxxx> wrote:



rudra <bnrj.ru...@xxxxxxxxx> writes:
dear friends,
in a program, i have to check if a given file is created.
i tried with
if (file==.true.) write "file created"
where file is character variable(the file name will vary itself in the
program).....which obviously gives error.

can anyone suggest me how to do this?

Hello,
apart from the semantic error (you are comparing a character variable
with a logical constant, how could you arrive at this idea?), what do
you mean by "a given file is created"?
If you open a file for writing, usually an empty file is created, if
that is possible. The IOSTAT value of the open statement tells you,
whether it was successful.
Or do you regard the file as created, when all data are written to it
and it is closed?

Given the level of your question, I think it is absolutely necessary
that you get some good book on programming in Fortran. Do you know any
other programming language?

Alois

the compairison is not possible...as i told, obviously an error. i
want to check if the file is created after some data is written to the
file and closed. guess i can do this by storing iostat....thnx anyway

thnx AM....i tried both INQUIRE and with iostat and both are working
.



Relevant Pages

  • Re: Syntax, expressiveness and the beauty of Tcl
    ... since it is only one character. ... when you are used to other programming languages. ... But if we take the discussion serious, my oppinion is to stick with real Tcl ...
    (comp.lang.tcl)
  • Re: How do I delete a folder through code?
    ... to have to convert a CString into a character array pointer. ... days when we wrote K&R C using NotePad, and in modern programming environments it has ...
    (microsoft.public.vc.mfc)
  • Re: Literature authors with similar styles
    ... Those are character names, a few of thousands of famous character ... >From a programming point of view, ... Her ability to cite hard data such as science ...
    (alt.usage.english)
  • Re: Online C Programming Quizzes
    ... Business, Math to programming languages. ... For C language, I have 3 set of quizzes that anyone is welcome to try ... assignment expressions have a value too... ... the null character is *still* ...
    (comp.lang.c)
  • Re: backslash-issues
    ... As i did not have my 'The F programming language' book at hand ... charis of type character and length one. ... in position i in the ASCII collating sequence. ... But unfortunately, if i compile this as being Fortran95, i still cannot ...
    (comp.lang.fortran)