JeanH
unread,Sep 1, 2009, 12:24:01 AM9/1/09You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I am trying to read from a file that has a fixed record length of 80
characters followed by a line feed chr(10). Input and InputLine do not
recognize the end of line so I opened it Random and am using GET. I can read
the file fine with GET. The problem is this. Sometimes the file we have to
read has a different record length and I cant figure out how to create a
fixed length buffer at run time. The command Dim Var1 as string * 81 has to
have a constant and the length of the buffer cannot be a variable. I also
cant seem to have a buffer longer than the record length. I thought that if
my buffer was 256 bytes that it wouldn't matter if I was reading an 81
character record or a 100 character record into it, but I was wrong. My
program throws an error if the buffer isn't exactly the same length as the
record. Is there a way to define the record length and buffer length at
runtime? Or better yet, is there a way to detect the LineFeed as the end of
line?