Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. pi3cho

    Variable numer of columns

    Hmm.. My fortran comipler is gfortran so it should work.I've made some changes to the code: program vol_aqua implicit none real:: length,width,height,volume character(8) :: name open (1,FILE='data02.txt',status='old') read(1,'(A10,F10.2)') name,height...
  2. pi3cho

    Variable numer of columns

    It doesn't work.When code looks like this: program vol_aqua implicit none real::height,lenght,width,volume character (8) :: name OPEN (1,FILE='data01.csv',status='old') read(1,*) name,height read(1,*) name,lenght read(1,*) name,width volume=(height*lenght*width)/1000...
  3. pi3cho

    Variable numer of columns

    Now i'm thinking that there's got to be a way to read variables even when data file (data.csv) looks like this height 100.0 lenght 80.0 width 90.0 How to read only numbers?
  4. pi3cho

    Variable numer of columns

    Finally I've changed the variables like this 100.0 80.0 40.0 height lenght width and it works.Uff Thanks a lot for help
  5. pi3cho

    Variable numer of columns

    Ok:)now i know what you meant but i've done it before and there was the same problem. Now data file looks like this: 100.0 height 80.0 lenght 40.0 width and it doesn't help. Maybe the problem is due to a file itself because first i'm creating 'data01' as an excel file and just then i'm saving...
  6. pi3cho

    Variable numer of columns

    Sorry but i don't get it."Height" is not a real numer and "volume,width,lenght" are? If "height" is not a real number then should it be integer (?) - but if so should't words "width,lenght" be integer also and word "volume" real? I'm confused.
  7. pi3cho

    Variable numer of columns

    Hi all, and thanks for preview help but another problem occured.I've wrote a code which looks like this: program vol_aqua implicit none real::,lenght,width,height,volume OPEN (1,FILE='data01.dat',status='old') read(1,*) height read(1,*) lenght read(1,*) width...
  8. pi3cho

    Variable numer of columns

    It's me again I found a program which writes 100 columns with numbers.Now i would like to do the same but write columns with leters like A,B,C PROGRAM tst IMPLICIT NONE INTEGER i,imxcol CHARACTER varfmt*13 imxcol=99 varfmt='(XXX(E20.10))' !i've tried to change E20.10 on A10...
  9. pi3cho

    FMT what does it mean?

    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?
  10. pi3cho

    FMT what does it mean?

    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

Part and Inventory Search

Back
Top