Ticket #543 (WorksForMe)Sun Jan 30 19:59:30 UTC 2022
Territory_Collate forces the Ignore flags to be set
Reported by: | Rick Murray (539) | Severity: | Normal |
Part: | RISC OS: Module | Release: | |
Milestone: | Status | WorksForMe |
Details by Rick Murray (539):
According to the API, R3 bit 0 is to ignore case and bit 1 is to ignore accents.
I noticed, when playing with the SWI in conjunction with HeapSort, that the settings of these flags had no effect on the outcome.
Possibly because line 173 ORRs in both flags, effectively forcing them both set, regardless of what options the user might have chosen to be passed into the SWI.
Changelog:
Modified by Rick Murray (539) Tue, February 01 2022 - 10:00:16 GMT
- Severity changed from Minor to Normal
As can be seen from the demonstration (linked below) a test using a set of names, some with accents and some in lower case, results in identical results for all four possible combinations of bits zero and one (whether or not to ignore accents and/or case).
Modified by Martin Avison (27) Tue, February 01 2022 - 12:15:20 GMT
I think it is slightly worse than Rick’s program shows.
Although the ROOL PRM Wiki only shows flags in bit 0 and 1, the OS SWIs StrongHelp manual says that bit 2 is ‘interpret cardinals (5.22+)’, which should result in File9 < File10.
So I modified the test program to check r3 flag values of 0 to 7, and that showed the results in each case were identical to Rick’s.
I then added two additional names of File10 and File9.
Flags 0, 1 & 2 are sorted like Rick’s program, but with File 9 and File10 added in that order, before Jessica.
Flags 3,4,5,6 & 7 have File10 then File9 before Jessica.
Modified by Martin Avison (27) Tue, February 01 2022 - 17:32:15 GMT
Apologies, my last comment was wrong.
Flags 0, 1, 2 & 3 are sorted like Rick’s program, but with File10 and File9 added in that order, before Jessica.
Flags 4,5,6 & 7 have File9 then File10 before Jessica.
So it appears that flag bit 2 works as intended.
Modified by Martin Avison (27) Mon, January 16 2023 - 22:30:14 GMT
- Status changed from Open to WorksForMe
- Attachment added: Collate.zip
Territory_Collate seems to work for me – see attached Collate program for demonstration.