| SecureUser |
| VERBatim - V25 |
| @ATTACK - @Files.System |
| Advanced Revelation Initialisation Sequence (Overview) by Mike Pope |
| REVMEDIA Revisted |
| Argument passing - Subroutines and Functions - Mike Pope |
| Caching in on the Frames Array - Mike Pope |
| QTIPS - Fast Dynamic Array Building |
| Catalyst |
| @ATTACK - @Ans |
| QTIPS - Compiling Work around on runtimes |
| QTIPS - Potential Problem When Using @ANS |
| Reader's Clinic - Functions and Subroutines |
| Argument passing - Subroutines and Functions - Mike Pope |
| QTIPS - Btree.Extract |
| Comp |
| Reader's Clinic - Removing "Searching Cross References" Message |
| @ATTACK - @List.Active |
| IConvs / OConvs |
| Reader's Clinic - Stop Lists |
| REVMEDIA Revisited |
| REVMEDIA Revisited |
| Reader's Clinic - Functions and Subroutines |
| Reader's Letters - Jim Owen |
| Playing with Scan Codes |
| Argument passing - Subroutines and Functions - Mike Pope |
RevMedia FKB
| Document | V1I4A6 |
| Title | Comp |
| Keywords | COMP RTP21 BTREE.EXTRACT |
| Text | In last month's RTPSeries we bewailed the fact that RTP21 was not accessible to normal programmers so this month we look at a system subroutine called COMP which has much of the functionality of RTP21 without requiring a system compiler to use Like all of the best routines COMP is staggeringly simple to use The multivalued array to be checked is put into @ANS and the comparison to be applied is passed as a parameter to the subroutine There is no complicated coding system to remember comparisons are sent as literals as with BTREE EXTRACT or the query window COMP then returns in @ANS a multivalued array of true/false flags corresponding to the comparisons requested Thus if @ANS was set to 1 : @VM : 2 : @VM : 3 and COMP was called WITH a comparison of ">2" @ANS would be returned as 0 :@VM : 0 :@VM : 1 The optimum use for this function is in determining how many of a multi valued set meet certain criteria As the answer is a true/false array all we need to so is sum the array to find out how many correct answers we have So if we had a field containing the ages of a subject's children and we wanted to find out how many of them were over 18 we would use the following code @ANS = {CHILDRENS AGE} CALL COMP(">18") NO OVER = SUM(@ANS) CALL MSG("%1% children over 18" "" "" NO OVER) I have tested this routine WITH the standard operators (= # > < >= <= % ] [ []) and it seems to work More options may be available further playing will tell! (Volume 1 Issue 4 Page 4) |
Page last modified: 30/01/03