SDELETE Examples


Example 1:

 

  

SDELETE

STRING

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

25

1

7

Delete the logical string

 

After:

STRING

25

1

1

the logical string·······

 

No Condition Flags are set (all FALSE).

 

Example 2:

 

  

SDELETE

STRING,COUNT

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

20

6

13

John Quentin Public·

 

COUNT

1

 

 

8

 

After:

STRING

20

6

6

John Public·········

 

No Condition Flags are set (all FALSE).

 

Example 3:

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

20

10

15

abcdefghijklmnopqrst

 

COUNT

1

 

 

9

 

After:

STRING

20

10

10

abcdefghipqrst······

 

The EOS flag is set to TRUE. The Logical String of STRING was too short to delete 9 bytes.

 

Example 4:

 

 

Variable

PL

FP

LP

Contents

Before:

STRING

20

0

10

abcdefghij··········

 

COUNT

1

 

 

3

 

After:

STRING

20

0

10

abcdefghij··········

 

The OVER Condition Flag is set. STRING was a null variable (null Logical String).

 

 



PL/B Language Reference SCAN Examples SEARCH Examples