Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

pi3cho (Programmer) (OP)
19 Oct 10 6:22
Hi all,
I'm new fortran user and i wanted to ask what FMT means in following line:

WRITE(1,FMT=varfmt)(i*1.,i=1,imxcol,1)?

Thanks for help
GerritGroot (TechnicalUser)
19 Oct 10 9:12
Format
FJacq (Programmer)
19 Oct 10 13:46
To be a little bit more precise than GerritGroot, even if his answer is in the same time short and correct, it exists three types of format when writing to (reading from) a formatted file :

- fmt=* : list directed format, which produces an output which is partly compiler dependent,

- fmt=label : the label is a integer value (10, 999 ...) which points to a specific FORMAT instruction associated to that label. In that case, the format is fixed (determined at compile time)

- fmt=variable_name : in that case, the format may be defined at run time and is represented by the contents of a CHARACTER variable.

Taking into account the instruction you have provided, it seems that you are using the third case.

Two additional remarks :

- the syntax 'fmt=' is optional if the format is provided in second position, like your example.

- a format follows rather complicated rules : you need to read the documentation before being able to create your own format.
pi3cho (Programmer) (OP)
20 Oct 10 2:16
Thank you all for help:)
I've got one more question and please correct me if I am wrong.In the instruction "fmt" means format and "varfmt" is a name of format created by user.Is that correct?
GerritGroot (TechnicalUser)
20 Oct 10 3:51
Yes, that's correct varfmt must be a string like
'(A3,F15.10,E20.15)' for example.

You can try findng out with WRITE(*,*)varfmt if you don't want to look it up in the code...   ..or WRITE(*,FMT='(A)')varfmt talking about formats...

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close