- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would someone give me instruction about method of "if ... then"?
I wonderwhich codewould be done whenty value will be changed from false to true as follows.
ty = .false.
ty = .true
if (ty) then
write ("true")
else
write("false")
end if
I really want to know which word, true/false, would be out into file.
Please someone help me as soon as possible.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I assume the actual code is not what you have written in your original post.
if (ty) then
else
means "if ty is .TRUE. then execute the following statements up to the else."
so ifin the code before the else, you are writing a value "true" to a file then that is the value you should see in the file.
If ty is *not* true then the statements between the else and the endif will be executed.
If you are still having problems then I suggest you post the actual code with a description of the problem.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for instructions.
Both instructioins are so helpful for beginer like me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page