RTP Series - RTP21
Comp
RTP Series - RTP21
Comp
SecureUser
VERBatim - V25
@ATTACK - @Files.System
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
REVMEDIA Revisted
RTP Series - RTP5
VERBatim - V22
QTIPS - Handy Compiler Options
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
QTIPS - Direct Assignment by Comparison
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
QUERY.SUB
QTIPS - Query Windows - Changing Colours
Readers Clinic - Quickly Coping with \
Window or Not ?
Vroom - Window Processing
QTIPS - Window Symbol Tables
VROOM - Window Processing II
@ATTACK - @HW
Uncommon Knowledge - WC_Reset%
Reader's Clinic - Related Windows
Window or Not?
Reader's Clinic - Scribe Replace Processes in Window
Soft Windows
QTIPS - Window Bug and Debugging Window Bug
Overlapping Windows And Window Menus
QTIPS - New Catalyst Option
QTIPS - Collectors on the fly
QTIPS - Blank Menus in Windows
QTIPS - Moving Objects the EASY way.
Reader's Clinic - Scribe Replace Processes in Window
Reader's Clinic - Functions and Subroutines
Reader's Letters - Jim Owen
Playing with Scan Codes
Argument passing - Subroutines and Functions - Mike Pope
Utility Diskette # 3 - Part I
QTIPS - Finding/Replacing Spaces With The Editor
Utility Diskette # 4
Vroom
RTP Series - RTP32
Utility Diskette # 3 - Part I
@ATTACK - @Modal
VERBatim - V6
QTIPS - Suppressing Initial Form Feed
QTIPS - Using RTP29 In Place of V6
Reader's Clinic - Page Marks in Windows

RevMedia FKB

DocumentV1I4A6
TitleComp
KeywordsCOMP
RTP21
BTREE.EXTRACT
TextIn 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)
[revmedia/copyrigh.htm]

Page last modified: 30/01/03