Toolkit Tutorial: Programming


  /* The next item gives the first molecule. */
 
molecule1 = dt_next ( container );
 
str = dt_arbsmiles ( & slen , molecule1 , 0 );
   
printf ( "The molecule is %.*s\n" , slen , str );

 
/* The next item gives the second molecule */
 
moleculeX = dt_next ( container );
 
str = dt_arbsmiles ( & slen , moleculeX , 0 );
   
printf ( "The molecule is %.*s\n" , slen , str );

 
/* The next item is the NULL object. */
 
moleculeX = dt_next ( container );
 
if ( NULL_OB == moleculeX )
   
printf ( "The NULL object is next.\n" );

 
/* A reset and next operation gives the first molecule again. */
 
dt_reset ( container );
 
moleculeX = dt_next ( container );
 
if ( moleculeX == molecule1 )
   
printf ( "Reset is like rewind.\n" );