From: robin on 28 Jan 2010 17:36 "RLFitch" <rlfitch(a)gmail.com> wrote in message news:c0b0096c-2167-4165-a16c-65c1b24c7ca5(a)m16g2000yqc.googlegroups.com... | In a write statement that contains an implied do loop such as: | | print *, (k, k = 1, numk) | | is it possible to add a format that has a variable: write (*, '(x, | numk(I3))') Actually, I was wondering why you have a single x and a repeat I3 format without spaces. The repeat I3 without spaces means that you can print only 2-digit numbers (assuming that you don't want the numbers to run into each other when there are 3 actual significant digits). If the values can be negative, you actually have room for only one-digit numbers (again assuming that you want at least one space between each number). Thus, better is something like (19(1X, I3)) for the format, which guarantees one space before each number, whether positive and negative or not.
First
|
Prev
|
Pages: 1 2 Prev: Another class of "DO10I=" bug Next: reading complex data using implied do loops |