Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Array Ouput

Status
Not open for further replies.

chris456s

Structural
Feb 2, 2017
50
I have an Array that I want to output to a txt file
When I use *MWRITE it works fines. I get a great text file. Organized just how I like it.
However, I want to add headers. A label above each column.
So I moved all the data down one row and assigned text strings as column labels to each column in the first row.
Now I get the following error "Must not use character parameters in real array"

So, if I'm not allowed to use text in an array, how to give labels to each column?
also, how could I put comma in between value each to make a CSV?
 
Replies continue below

Recommended for you

I use *vwrite below are lines from a macro that do what you want to do

*vwrite,'ISTEP','TIME','DUCT','LEVEL','FACE 1','FACE 2','FACE 3','FACE 4','FACE 5','FACE 6','VX','VY','vyy'
%5C %4C %4C %5C %6C %6C %6C %6C %6C %6C %2C %2C %3C
*vwrite,istep,tame,ductno,levelno,gf1,gf2,gf3,gf4,gf5,gf6,vx,vy,vyy
%5I%8.0F%5I%5I%10.2F%10.2F%10.2F%10.2F%10.2F%10.2F%2X%15.6E%15.6E%2X%15.6E

Rick Fischer
Principal Engineer
Argonne National Laboratory
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor