Nagging Question (OpenInsight Specific)
At 01 OCT 1999 10:27:37AM Don Miller - C3 Inc. wrote:
In AREV (and GREV, for that matter), we've always had to use a code snippet like the following to solve an RTP57 run-time error problem on OSBREAD / OSBWRITE:
The problem manifests itself with the modulo of the byte offset for read/write operations (65536) is 21930.
FOOBAR=MOD(BYTE.POS,65536)
IF FOOBAR=21930 THEN
BYTE.POS-=1 ;* decrement by oneOSBREAD BYTE FROM FVAR AT BYTE.POS LENGTH 1 ;* read a byteOUTPUT.REC=BYTE:OUTPUT.REC ;* tack it to the headEND
OSBWRITE OUTPUT.REC ON FVAR AT BYTE.POS
BYTE.POS+=LEN(OUTPUT.REC)
Is this still required in OI??
Don Miller
At 02 OCT 1999 01:06AM Steve Smith wrote:
Don,
Wouldn't be surprised if the 21930 bug is still there.
Can you write program to check?
Steve
At 04 OCT 1999 10:54AM Don Miller - C3 Inc. wrote:
Steve .. will do and report back.
Don M.
At 05 OCT 1999 04:12PM Don Miller - C3 Inc. wrote:
The bug is dead!! Long live OI. This used to be a genuine headache when writing import/export programs. The offset I used was 87466 which MOD(65536) is 21930. No longer is the following needed:
FOOBAR=MOD(BYTE.POS1,65536)
IF FOOBAR=21930 THEN
BYTE.POS1-=1OSBREAD BYTE FROM FVAR AT BYTE.POS1 LENGTH 1OUTPUT.REC1=BYTE:OUTPUT.REC1END
Don M.