|
-
Jul 7th, 2000, 01:45 AM
#1
Thread Starter
Addicted Member
HI,
I need to translste a file from one chr to another chr, What is the best way - good performance - to achive that task?
0) read the file
1) call a function with 200 case in that function to translate chr after chr ?
2) used Instr command ?
3) any other way???
Regards
-
Jul 7th, 2000, 04:21 AM
#2
Fanatic Member
What exactly do you want to do? Could you please explain your intentions a little better.
Iain, thats with an i by the way!
-
Jul 7th, 2000, 08:05 AM
#3
transcendental analytic
Open the file in binary, input all chr's in a byte array, use your algoritm (since you didn't tell us i guess you know) to convert each chr to the correct one
Code:
dim buffer() as byte
ff=freefile
Open yourfile for binary as ff
get ff,,buffer
close ff
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.
-
Jul 8th, 2000, 12:37 AM
#4
Thread Starter
Addicted Member
Sorry folx,
What i have to do is a convert a file (all chars) from 1 chr to another chr - say chr(210) to chr(89). i like to know in a Performence point of view!! what is the best way to it? this is not for encryption!!!.
1) Call function Convert(byte)
select byte
case ..
case ..
..
..
- up to 255 times select
2) Using instr instraction ?
3) any other way?
Thanks
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
|