tips:revmedia:subs26

XREF

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies14 NOV 19892.XEXPERTXREF

XREF parses a string into a multivalued field based on the delimiters specified.

field

The string to be parsed into a multivalued field

delims

A string of characters to use as delimiters. XREF converts any delimiters specified to @VM in field.

stops

A dynamic array of words not to be indexed. This defaults to the value of @DEFAULT.STOPS (see Appendix 1, System Variables). The words must be delimited by | or @VM.

stops.mode

An integer from 1 to 3 which determines the value of stops (defaults to 1):

ValueStops value
1@DEFAULT.STOPS
2@DEFAULT.STOPS:@VM:stops
3stops

XREF returns the new multivalued field in @ANS.

  
*Initialization and defaults for each  example  
DECLARE SUBROUTINE XREF,MSG  
STOPS = ''  
STOPS.MODE = ''  
  
*Display a new multivalued field  
FIELD = 'file*record*field'  
DELIMS = '*'  
@@ANS = ''  
XREF(FIELD,DELIMS,STOPS,STOPS.MODE)  
MSG('The new multivalued field is:|':@ANS','','','')  
  
*Display the new multivalued field and supply additions to  
*the default stop list  
FIELD = 'file#record*field*number#record*field*number'  
DELIMS = '* #'  
STOPS = 'number'  
STOPS.MODE = 2  
@@ANS = ''  
XREF(FIELD,DELIMS,STOPS,STOPS.MODE)  
MSG('The new multivalued field is:|':@ANS,'','','')
  • tips/revmedia/subs26.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1