replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Writng to a binary file
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Writng to a binary file

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
christyleomin



Joined: 08 Apr 2011
Posts: 155

PostPosted: Fri Jun 01, 2012 8:42 am    Post subject: Writng to a binary file Reply with quote

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
View user's profile Send private message
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: D�sseldorf, Germany

PostPosted: Fri Jun 01, 2012 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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