Description
Discard occurences in hitlist.
Use Case
Documentation of statement discard for Uniface 9.5: The behavior following discard is governed by the location of the discarded occurrence: If the discarded occurrence is not the last occurrence, the next occurrence is made active after a discard. If the discarded occurrence is the last occurrence, the previous occurrence is made active after discard. Imagine 3 occurences retrieved. According to documentation, discard on 2nd occurence should make previously 3rd occurence current. It is true, but only when all 3 occurences were already fetched. When occurences are not fetched, 1st occurence is current. Uniface probably thinks that discarded occurrence is the last occurrence There is something wrong, either in documentation, or in Uniface behaviour. I expect a correction in documentation is more easy, but I prefer correction in Uniface behaviour. BTW, I think there is another mistake in a table bellow. Value in first row is not 1, but >0. Thanks Stanislav
Importance
It is confusing for all developers
Type
Scripting/Coding
Operating System
Not Applicable
Status
Open
Workaround could be to add compare/next before discard. This fetches data of next occ into component and discard then bahaves as expected.