next up previous index
Next: M502 Decoding Options Up: CERNLIB Previous: M442 Fortran Emulation

M501 Locating a String of Same Words

Routine ID: M501
Author(s): C. LetertreLibrary: KERNLIB
Submitter: Submitted: 21.08.1971
Language: Fortran or AssemblerRevised: 15.09.1978

IUSAME locates the first of a continuous sequence of identical words occuring at least a given number of times. It returns the number of contiguous identical words in the sequence.

Structure:

FUNCTION subprogram
User Entry Names: IUSAME

Usage:

    NSAME = IUSAME(VECT,JL,JR,MIN,JSAME)
VECT(JL)
Start of the portion of the vector to be analysed.
VECT(JR)
End of the portion of the vector to be analysed.
MIN
Minimum length of a string to be considered a string.
The function returns the length of the string as function value, and also the position of the first element of the string: VECT(JSAME).

If no string of at least MIN elements has been found starting at or after VECT(JL), the function returns NSAME=0 and JSAME=JR+1 .

M502


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995