Programming Guide |
Deletes occurrences from a field
int sm_i_doccur(char *field_name, int occurrence, int count);int sm_o_doccur(int field_number, int occurrence, int count);
field_name
field_number- The field with the occurrences to delete. In Panther 5.50 and later,
field_name
can also be a grid frame or a syncronized scrolling group.occurrence
- The first occurrence to delete in the array specified by
field_number
orfield_name
.count
- The number of occurrences to delete, starting with
occurrence
. If you supply a negative value, Panther inserts new occurrences aboveoccurrence
, with the same restrictions that apply to sm_ioccur.
- 0 The number of occurrences deleted.
sm_i_doccur
andsm_o_doccur
delete data fromcount
occurrences, starting withoccurrence
. If the array is scrolling, Panther then deallocatescount
occurrences. Panther moves up data in the occurrences after the last-deleted occurrence to prevent gaps in the array.If
count
is equal to or greater than the number of allocated occurrences, Panther deletes all data from the array.If other arrays are synchronized with this one,
sm_doccur
performs the same operation on them, provided theirclearing_protect
property is set toPV_NO
.sm_doccur
ignores the target array'sclearing_protect
setting.You can use
sm_doccur
to insert new occurrences in a field by supplying a negative value forcount
. You can achieve the same effect withsm_ioccur
.This function is normally bound to the logical key DELL.