gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] INSPECT CONVERTING ?


From: Richard Smith
Subject: [open-cobol-list] INSPECT CONVERTING ?
Date: Fri Apr 2 18:25:03 2004

I'm kind of a beginner to COBOL, but I've noticed a difference in
behaviour between open-cobol and other cobols.

77  YYY PIC X(3) VALUE "ABC".
77  ZZZ PIC X(3) VALUE "BCD".
77  XXX PIC X(3) VALUE "BCA".

INSPECT XXX CONVERTING YYY TO ZZZ.

open-cobol would convert 'XXX' to "DDD", whereas others would
make it "CDB" (which I hope is correct).

If this is wrong behaviour, then it could be fixed with this
diff:

diff -r1.48 strings.c
202c202
<       if (inspect_start[i] == f1->data[j])
---
>       if (inspect_start[i] == f1->data[j]){
203a204,205
>       break;
>       }

If it was a bug, then its one less :)

Richard Smith

---

/~\   The ASCII Ribbon Campaign
\ /       No HTML in email
 X    No M$ attachments in email
/ \


reply via email to

[Prev in Thread] Current Thread [Next in Thread]