ascii file

Jean Pierre Arabonis arabonis at EGS.UCT.AC.ZA
Tue Feb 15 03:45:24 EST 2005


Hi
    fwrite will produce a binary file, you need to write a script,
somthing like the following for ascii, using the write command:

function main(args)
i = 1
while i <= 249
'set t ' i
'd htsgwsfc'
Val=subwrd(result,4)
write (Valuedir.txt,Val, append)
i = i + 1
endwhile


Good Luck
    Jean Pierre




Martine Michou wrote:

> Mallikarjun wrote:
>
>> Hello Martine Michou,
>>
>> Use 'fwrite' command as follows:
>>
>> 'set fwrite <file name.dat>' *** give file name there 'set gxout
>> fwrite' 'd <variable>'  *** Enter the variable ***
>>
>>
>> To check the .dat file you must quit the grads.
>>
>> Try it out....
>>
>
>
>
> Thanks for your response.
>
> However, I cannot read the file file name.dat with a simple more file
> name.dat or vi file name.dat command.  Apparently the file I generate is
> a binary file and not an ASCII file.
>
> Any suggestion?
>
> Thank you.
>
> Martine Michou
>

--
Jean Pierre Arabonis
arabonis at egs.uct.ac.za
Tel 021 780 1021 cell 084 401 1365
This email is 100% Microsoft Free



More information about the gradsusr mailing list