-
Oct 16th, 2000, 07:03 AM
#1
Okay, my problem is that I make a new header for a file, reading info from old one. But after the header, I should copy many megabytes of data. So what do you suggest?
Just asking this ready for future use, I know I will need this info a lot, atleast for a while.
-
Oct 16th, 2000, 07:58 AM
#2
transcendental analytic
Open both files syncronous, create the new header (Put the header data, (the location will move automatically to the huge data section) Use Get at the position of the old file huge data section (header legnth + 1, i guess) And Get the huge data from old file into a byte array, then put it in the new file and close both.
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 16th, 2000, 12:08 PM
#3
Limit
I've Visual Basic 4 and it seems to have size limit with arrays. I've thought that can I do straight copy or is it have to copy data first into array and then in to the other file?
-
Oct 16th, 2000, 12:28 PM
#4
transcendental analytic
There's a statement for copying file called Filecopy, but i'm sure youre not looking for that, No need to worry about limits, the byte array will be resized automatically before Getting the data. Here's how you do:
Code:
Dim a() as byte
Open Target for Binary as 1
Open Source for Binary as 2
Put#1,,HeaderUDT ' or a set of variables
Get#2,len(HEaderUDT)+1,a
Put#1,,a
Erase a
Close 1,2
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 17th, 2000, 06:04 AM
#5
Got it
Okay, I got it work with a couple of changes. Thanks for your help
Needed to add ReDim A (sizeofdatatobereaded)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|