Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
8 Views

Odd behavior

Jump to solution

I am using ivf 2018 u3 on a Win 10 machine and I've run into an odd behavior that I cannot fix. First I show you the output on the console:

Name      Var.        xbar
N                1          11.5406
1/N            2           0.1039
1/N^2      3           0.0129
Y          4          67.8702

Name      Var.        Std.Dev.
N                1           4.7798
1/N            2           0.0476
1/N^2      3           0.0118
Y          4          15.7757

All the arithmetic is correct but the format is messy. I was using a format statement with the fields: "A, T11, i2, T15, f15.4" and then I tried something a little different:but I get exactly the same results. Here is the code:

	do i = 1, nVars
           mLine = '                                                       '
           mLine(1:9) = Names(i)(1:9)
           write(mLine(11:12),'(i2)') i
           write(mLine(15:30),'(f15.4)') xb(i)
	   write(6,'(a30)') mLine(1:30)
       end do

I am using a Courier font. Does anyone have a suggestion? I am at a loss.

Thanks, Brooks

0 Kudos

Accepted Solutions
Highlighted
Valued Contributor II
8 Views

Try putting

Jump to solution

Try putting

write(6,*) ichar(transfer(Names(i)(1:9),['A']))

in the loop so we can see if there are any hidden characters (like HT) in the Names strings.

 

View solution in original post

0 Kudos
4 Replies
Highlighted
Valued Contributor II
9 Views

Try putting

Jump to solution

Try putting

write(6,*) ichar(transfer(Names(i)(1:9),['A']))

in the loop so we can see if there are any hidden characters (like HT) in the Names strings.

 

View solution in original post

0 Kudos
Highlighted
Black Belt
8 Views

What is the length of the

Jump to solution

What is the length of the `Names` object?  Is its LEN more than 9?

0 Kudos
Highlighted
New Contributor II
8 Views

Hello

Why not ?

	       write(6,'(A9,2x,i2,2x,F15.4)')Names(i),i,xb(i)

 

0 Kudos
Highlighted
New Contributor I
8 Views

Thanks, the problem was tab

Jump to solution

Thanks, the problem was tab characters within Names(*), which I had read from a text file.

 

Brooks

0 Kudos