[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Reading Binary files
- Subject: Reading Binary files
- From: Bill Beckner <Bbeckner@ICC.CC.IL.US>
- Date: Thu, 6 Jan 2000 09:40:29 -0600
Hello SQR gurus! I hope someone can help....
We are using SQR 4.3.4.
I'm having difficulty in reading a binary file, which is a PCL image file,
into a string variable. I've opened the file with a record-length of 9559
(the # of bytes in the file) and set the record type as FIXED_NOLF:
open 'P:\BILL\SQR\HR\ICCLOGO2.PCL' as #In for-reading
record=9559:fixed_nolf
status=#InStatus
Now when I READ the file:
READ #In into $ICCLogo:9559
I only get the first 19 bytes of the file (up to the first NULL byte). Is
there any way to get the entire file into a single string variable? Or is
this plan doomed to failure? TIA!!!
--
William Beckner -- Stunt Programmer (Just call me "Bill")
Illinois Central College, Rm L141 -- East Peoria, IL 61635-0001
PH: (309) 694-8419 -- FAX: (309) 694-8995
"C code. C code run. Please, code, RUN!"