Deletes the specified element from the stack.
Integer_Type stk_delete_num( Stack_Type stack, Integer_Type N )
The stk_delete_num() routine deletes the given item in the stack.
If the element index (N) is not valid then nothng is done, otherwise
the element is deleted and the remaining items are shifted back.
If successful, this routine returns 0, and non-zero indicates failure.
chips> stk_disp( stk )
------
Stack position: 3
Stack size: 3
Stack allocated: 100
Stack entries:
1 :a.dat:
2 :b.dat:
3 :c.dat:
------
chips> () = stk_delete_num( stk, 2 )
chips> stk_disp( stk )
------
Stack position: 2
Stack size: 2
Stack allocated: 100
Stack entries:
1 :a.dat:
2 :c.dat:
------
- modules
-
stackio
- stackio
-
stk_append,
stk_build,
stk_change_current,
stk_change_num,
stk_close,
stk_count,
stk_current,
stk_delete_current,
stk_disp,
stk_expand_n,
stk_read_next,
stk_read_num,
stk_rewind,
stk_set_current
|