VecStr

| HOME | BACK |

Overview

VecStr is an object designed to use for a one dimensional array of string objects.  It can be used to stored a list text data, in which each record is separated by terminated characters.  In MS Window, terminate characters are RETURN (ASCII 13) followed by NEWLINE (10).  In Unix, it is a NEWLINE character.  In MAC OS it is a RETURN character.  VecStr can be used to read and store a non-standard format data.  Then the interesting data can be later on extracted, by using all sorts of string manipulation techniques.

The "pushback" function is, most of the time, used for input data into a vector object.

 

Member data

Name Data type Meaning
size int no of data in the vector
maxsize int no of maximum data can be stored in a vector

 

Operator

plus (+)       concatenate two vectors                       e.g.      v3 = v1 + v2

minus (-)     subtract one vector from the other          e.g.      v3 = v1 - v2

and (&)       find intersection of two vectors               e.g.      v3 = v1 & v2

or ( | )         find union of two vectors                        e.g.      v3 = v1 | v2              

 

 

Construction function

{VecStr} ret  =  VECSTR([{int} argm1])

argm1 = max no of data in the vector    (default = 1)

Example:

->v1 = VecSTr() create a vector with max size = 1 (by default)

->v1 = VecStr(200)

create a vector with max size = 200

 

Lfunction

object({int} argm1)   =  {String} left-value

argm1 = vector index

Example:

->v1(0) = "Noobeed" set value of the 1st element to "Noobeed"

 

Class function

 ( )  EXTEND FIND FINDALL FINDFROM
  HSORT INIT LAST LOAD
MAXSIZE MPUSHBACK  PUSHBACK QFIND  
 REMALL REMOVE REMSORT  REVERSE SAVE
 SIZE SORT TRUNCATE  UNSTACK WINDOW

 


| HOME | BACK |