FINDCHAR Examples


Example 1:

 

  

FINDCHAR

ITEM1,ITEM2,ITEM3

 

 

Variable

PL

FP

LP

Contents

Before:

ITEM1

5

3

 5

ABCDE

 

ITEM2

5

1

 5

TEST·

 

ITEM3

1

0

 0

·

 

After:

ITEM1

5

3

 5

ABCDE

 

ITEM2

5

2

 5

TEST·

 

ITEM3

1

1

 1

E

 

The EQUAL Condition Flag is set. The last character of Item 1 (E) matched the second character of Item 2. The located character is stored in Item 3 and the Form Pointer of Item 2 is changed.

 

Example 2:

 

 

Variable

PL

FP

LP

Contents

Before:

ITEM1

5

1

 4

HOMEX

 

ITEM2

5

1

 5

X-RAY

 

ITEM3

1

0

 0

·

 

After:

ITEM1

5

1

 4

HOMEX

 

ITEM2

5

1

 4

X-RAY

 

ITEM3

1

0

 0

·

 

The EQUAL Condition Flag is cleared (FLASE) and Item 3 remains unchanged. No character in the logical string of Item 1 (HOME) was found in Item 2.

 



PL/B Language Reference FILL Examples FLUSH Example