"mads" <mads@mschumacher.com> wrote in message news:<bgsa2a$h22$1@nntp.msstate.edu>...
> "Andrew Cool" <andrew.cool@dsto.defence.gov.au> wrote in message
> news:c6d70400.0308061416.7b199fe2@posting.google.com...
>> "mads" <mads@mschumacher.com> wrote in message
> news:<bgpub7$34s$1@nntp.msstate.edu>...
>>> "mads" <mads@mschumacher.com> wrote in message
>>> news:bgptgt$2qm$1@nntp.msstate.edu...
>>>> fmt = '(a, /, i2, /, 3(f5.2, 2x), /, 2(2(f3.0, 2x), /), f3.1, /,
> 4(f5.2,
> 2x,
>>>> a, /),$
>>>> a, /, i2, /, 3(f4.2, 2x), /, 2(2(f4.1, 2x), /), 3(f6.3, 2x), /,
> 5(f6.2,
> 2x,
>>>> a, /), $
>>>> 4(5.2, 2x), /, 5(7.3, 2x), /, 3(a, /), 2(4(5.0, 2x), /), 2(a,2x), /)'
>>>> "
>
>>> But the error below is still on..............
>>>
>>>> a, /, i2, /, 3(f4.2, 2x), /, 2(2(f4.1, 2x), /), 3(f6.3, 2x), /,
> 5(f6.2,
> 2x, a, /), $
>>>> ^
>>>> % Syntax error.
>>>> At: /home/madhu/thesiswork/thesis.pro, Line 20
>>>>
>>>> What is the problem?
>>
>> The problem is that you're trying to cram too much onto one line, just
> like
>> you are in your structure definition... ;-)
>>
>> Why not :-
>>
>>
>> fmt = '(a, /, i2, /, 3(f5.2, 2x), /, 2(2(f3.0, 2x), /), f3.1,)'
>>
>> fmt = fmt + '(/, 4(f5.2, 2x,a, /),a, /, i2, /, 3(f4.2, 2x), /,)'
>>
>> fmt = fmt + '( 2(2(f4.1, 2x), /), 3(f6.3, 2x), /, 5(f6.2, 2x, a, /))'
>>
>> fmt = fmt + '(4(5.2, 2x), /, 5(7.3, 2x), /, 3(a, /))'
>>
>> fmt = fmt + '(, 2(4(5.0, 2x), /), 2(a,2x), /)'
>>
>>
>> But why such a whooping great format statement anyway?!?!
>
> I am basically trying to create a file each time in a loop which will b read
> by a fortran code which will in turn write out into a file on which i will
> work. these are the parameters that will be changed and written into the
> file which will b the i/p to the fortran code. do u have any suggestions?
> breaking up the structure into 2 or breaking up the format code into so many
> parts is ok but its just as prone to error as the method i used above is
> what i feel
Look closer. You tried to split continue/split the format statement
in the middle of a whole segment, for want of a better description, which
produced the syntax error.
Crude as it is, my effort splits your format statement at natural/valid
boundaries and makes it more readable in the process. No syntax error either.
mads 0/1 andrew 1/1
You really ought to seek assistance from that Fanning guy to sort out
your other barrow load of problems...
|