SDELETE
PLBCMP Only
The SDELETE instruction provides the ability to delete all or part of the Logical String from a character string variable. This may be extremely useful on variables that contain one or more field(s) that need removal. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A previously defined Character String Variable in which characters are deleted.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
count
Required. A previously defined Numeric Variable, Expression, or decimal constant indicating the number of characters to delete.
Flags Affected: EOS, OVER, ZERO
Note the following:
SDELETE attempts to delete {count} number of bytes between the Form Pointer and the Length Pointer in {dest}. If {count} is not given, the entire Logical String is deleted. Once deleted, the bytes beyond the Length Pointer are shifted left to the Form Pointer. The bytes after the last byte that was shifted and the Physical Length are blank filled and Length Pointer is decremented by the number of bytes deleted.
If {count} is not specified, the logical string length is used.
If {count} is a FORM variable, only the integer portion (preceding the decimal) is used. If this portion of {count} is equal to zero, the EQUAL Condition Flag is cleared.
If {count} is greater than the size of the Logical String, only the Logical String contents are deleted and the EOS Condition Flag is set.
If {dest} is a Null String, the OVER Condition Flag is set.
The SDELETE instruction is obsolete and the SPLICE instruction should be used instead.
See Also: Example Code, SINSERT, Character String Instructions
![]() |