/*  --- Copyright University of Sussex 1995. All rights reserved. ----------
 >  File:           C.all/lib/database/database_present.p
 >  Purpose:        returns true iff its argument is in the database
 >  Author:         John Gibson, Dec 27 1995
 >  Documentation:  REF * DATABASE
 >  Related Files:
 */
compile_mode :pop11 +strict;

section;

define database_present(item);
	lvars item, x;
	for x in database do
#_IF DEF DATABASE_USE_MATCHVARS or DEF POPC_COMPILING
		if x = item then
#_ELSE
		if x matches item then
#_ENDIF
			x -> database_it;
			return(true);
		endif
	endfor;
	return(false)
enddefine;

endsection;
