Skip to the navigation links
Last modified: December 2009

URL: http://cxc-newtest.cfa.harvard.edu/ciao4.2/stackio_stk_delete_current.html
AHELP for CIAO 4.2

stk_delete_current

Context: stackio

Synopsis

Deletes the current element from the stack.

Syntax

Integer_Type stk_delete_current( Stack_Type stack )

Description

The stk_delete_current() routine deletes the current item in the stack. The remaining items are shifted back and the stack pointer remains at the same position, unless the current item was also last item in the stack. In this case, the pointer is moved back one. If successful, this routine returns 0, and non-zero indicates failure.

The stackio module is not available by default; to use it in a S-Lang program, it must be loaded using the S-Lang require() function:

  require("stackio");

Example

slsh> require("stackio");
slsh> stk_disp( stk );
------
Stack position: 2
Stack size: 3
Stack allocated: 100
Stack entries:
1 :a.dat:
2 :b.dat:
3 :c.dat:
------
slsh> () = stk_delete_current( stk );
slsh> stk_disp( stk ) ;
------
Stack position: 2
Stack size: 2
Stack allocated: 100
Stack entries:
1 :a.dat:
2 :c.dat:
------

Bugs

See the bugs page for the stackio library on the CIAO website for an up-to-date listing of known bugs.

See Also

modules
stackio
stackio
stk_append, stk_build, stk_change_current, stk_change_num, stk_close, stk_count, stk_current, stk_delete_num, stk_disp, stk_expand_n, stk_read_next, stk_read_num, stk_rewind, stk_set_current

Last modified: December 2009