[futurebasic] Re: [FB] ASCII Text Not Being Print#ed??

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2001 : Group Archive : Group : All Groups

From: Jeff810095@...
Date: Sat, 8 Dec 2001 11:57:43 EST
Jonnnathan & Alain

Thanks for the replies.

>>i'd suggest....:
>>if(( prev$[1] = myRC) and( rectRecord$[1] = myLF)) then goto "skipLF"

Will do.

>>but can't you just strip out "LF"s ?<<

Yes, BUT when I started this I was unsure if I wanted to add other options to 
handle CR and LF's (or their pairs) in different ways (since PC, Mac and Unix 
can sometimes handle them differently). I am also trying to print this "text" 
file to a Sercomm PrintMate print server (connected to a Lexmark 2380 Plus 
dot matrix printer). And I was initially unsure what I needed to do to the 
original to get it top print properly (it kept printing an extra blank line 
between lines).

>>I would suggest another approach. First, Read the 
>>whole file in memory and apply Munger to remove the
>>unwanted characters then save the resulting handle,

Yes, I know my approach is not the most elegant. Or fastest way to do it. 
Staz sent me some sample code too. But a couple points in my defense:
1. My approach was faster to write and understand (i.e. "debug") for me.
2. I needed to get something working quickly. I also didn't want to have to 
worry about memory allocation...since virtually no data is stored in memory 
the size of the file I'm converting doesn't matter.
3. Speed was not really an issue, even files 90K in size convert amazingly 
quickly
4. I may be wrong about this, but doesn't data written to a disk file first 
actually get written to the disk cache (system RAM....or, actually, cache in 
the hard drive controller)...then only get moved to the disk if the cache is 
full or a close command executed? My computer has a disk cache over 6000K. So 
the file is actually getting written to RAM as the program is executed. 
Correct?

You are both correct however, and I apprecite the suggestion. But right now 
speed improvements will have to wait until I get something working that is 
*reliable*.

>>FB^3 had an issue resetting properly the file marker in some instances.<<
eeeeee.....great. Well, at least I know it may not be my code. But this sort 
of thing can shake ones confidence in FB if you know what I mean. It also 
greatly slows application development when you spend hours trying to find a 
"solution" to a problem that shouldn't exist.

>>Read the whole file in memory and apply Munger<<
Apply Munger? What's munger? It sounds like a kinda cheese.... :)

Again, many thanks for the ideas and suggestions...
Jeff-
http://www.acmenet.net/~jeffny/AppleTalk/print.html