SINSERT Examples


Example 1:

 

  

SINSERT

DEST,FILLER

 

 

Variable

PL

FP

LP

Contents

Before:

DEST

20

6

11

John Public·········

 

FILLER

10

1

8

Quentin···

 

After:

DEST

20

14

19

John Quentin Public·

 

FILLER

10

1

8

Quentin···

 

No Condition Flags are set (all FALSE).

 

Example 2:

 

  

SINSERT

DEST,FILLER,COUNT

 

 

Variable

PL

FP

LP

Contents

Before:

DEST

20

6

20

John Public·········

 

FILLER

10

1

7

Quentin···

 

COUNT

2

 

 

·1

 

After:

DEST

20

7

20

John-QPublic········

 

FILLER

10

1

7

Quentin···

 

COUNT

2

 

 

·1

 

No Condition Flags are set (all FALSE) since no significant (non-blank) data was lost.

 

Example 3:

 

 

Variable

PL

FP

LP

Contents

Before:

DEST

20

6

11

John-Public·········

 

FILLER

10

0

0

Quentin···

 

COUNT

2

 

 

·7

 

After:

DEST

20

13

18

John········Public··

 

FILLER

10

0

0

Quentin···

 

COUNT

2

 

 

·7

 

No Condition Flags are set (all FALSE). FILLER is blank filled since it was null (Form Pointer is zero).

 

Example 4:

 

 

Variable

PL

FP

LP

Contents

Before:

DEST

20

6

11

John Public·········

 

FILLER

10

1

7

Quentin···

 

COUNT

2

 

 

·0

 

After:

DEST

20

6

11

John-Public·········

 

FILLER

10

1

7

Quentin···

 

COUNT

2

 

 

·0

 

The EOS Condition Flag is set since COUNT was equal to zero.

 

Example 5:

 

 

Variable

PL

FP

LP

Contents

Before:

DEST

20

0

15

Jonathan Public·····

 

FILLER

13

1

13

Quentin-Adams

 

COUNT

2

 

 

·8

 

After:

DEST

20

0

15

Jonathan-Public·····

 

FILLER

10

1

13

Quentin-Adams

 

COUNT

2

 

 

·8

 

The LESS Condition Flag is set since DEST is null.

 

Example 6:

 

 

Variable

PL

FP

LP

Contents

Before:

DEST

20

10

15

Jonathan Public·····

 

FILLER

13

1

13

Quentin Adams

 

COUNT

2

 

 

·8

 

After:

DEST

20

10

15

Jonathan Public·····

 

FILLER

10

1

13

Quentin Adams

 

COUNT

2

 

 

·8

 

The OVER Condition Flag is set since significant data would be lost (lic). Therefore, no operation was performed.

 



PL/B Language Reference SINH Examples SKIP Examples