Daylight v4.9
Release Date: 1 February 2008

Name

dt_insert - insert an object into a sequence

Generic Prototype

dt_insert(dt_Handle, dt_Handle) => dt_Handle

C Prototype

#include "dt_smiles.h"

dt_Handle dt_insert(dt_Handle sequence, dt_Handle object)

FORTRAN Prototype

include 'dt_f_smiles.inc'

integer*4 dt_f_insert(sequence, object)

integer*4 sequence
integer*4 object

Description

Inserts the object into the sequence before the current object. The newly inserted object becomes the current object in the sequence.

The new object is inserted before the object most recently returned by dt_next(3), or at the start of the sequence if dt_reset(3) was the last operation, or at the end of the sequence if dt_atend(3) would return TRUE.

dt_next(3) will return the same value it would have before the insertion occurred. A sequence that is reset before the insertion is no longer reset, since the newly-inserted object becomes the current object.

Note that 'object' can be the NULL_OB. When NULL_OB is an item in a sequence, dt_atend(3) is required with dt_next(3) to determine when the end of the sequence is reached.

Return Value

Returns the handle of the sequence.

Related Topics

dt_atend(3) dt_atstart(3) dt_count(3) dt_next(3) dt_reset(3) dt_append(3) dt_delete(3) dt_seqsort(3) dt_stream(3) dt_toend(3)