![]() | 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_namecan also be a grid frame or a syncronized scrolling group.occurrence- The first occurrence to delete in the array specified by
field_numberorfield_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_doccurandsm_o_doccurdelete data fromcountoccurrences, starting withoccurrence. If the array is scrolling, Panther then deallocatescountoccurrences. Panther moves up data in the occurrences after the last-deleted occurrence to prevent gaps in the array.If
countis 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_doccurperforms the same operation on them, provided theirclearing_protectproperty is set toPV_NO.sm_doccurignores the target array'sclearing_protectsetting.You can use
sm_doccurto 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.