 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
christyleomin
Joined: 08 Apr 2011 Posts: 155
|
Posted: Fri Jun 01, 2012 8:42 am Post subject: Writng to a binary file |
|
|
I have a file open -binary file as below:
Code: | open(unit=10,file=my_file_name,status='unknown',form='unformatted',
access='direct',recl=512*8) |
The file needs to contain 512 words of 8 bytes each. Now I want to write few words forst as below:
!word_count_no is predefined
Code: | write(10,rec=record_no)geom_data(word_count_no:512) |
I get an error saying that a sub-string must be a character type.
Can anyone advise what is wrong? |
|
Back to top |
|
 |
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: D�sseldorf, Germany
|
Posted: Fri Jun 01, 2012 11:58 am Post subject: |
|
|
How did you define the variable geom_data?
Perhaps you can use
Code: | write(10,rec=record_no)(geom_data(k),k=word_count_no,512) |
Regards - Wilfried |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|