The delete procedure
The delete procedure deletes components from a
list or a string.
- The first parameter is a reference to the list variable,
or the string variable from which components are deleted.
- The second parameter is an expression of
integral type, and specifies the position to start
deleting components from.
- The third parameter is an expression of
integral type, and specifies the number of components to
delete. If this parameter is omitted then all the components from the start position to the
end of the list or string
delete(l, 1) deletes all components in the list l
delete(l, 2) deletes all components from l except the first one
delete(l, 1, 3) deletes the first three components from l
delete(s, 1) deletes all characters from the string s
delete(s, 2) deletes all characters from s except the first one
delete(s, 1, 3) deletes the first three characters from s
Operating Systems: All
Standard Pascal: No