Viewing contents of file '../idllib/idl_5.2/lib/hdf_exists.pro'
; $Id: hdf_exists.pro,v 1.5.6.1 1999/01/16 16:40:47 scottm Exp $
;
; Copyright (c) 1992-1999, Research Systems, Inc.  All rights reserved.
;	Unauthorized reproduction prohibited.
;
;+
; NAME:
;	HDF_EXISTS
;
; PURPOSE:
;	Test for the existence of the HDF library
;
; CATEGORY:
;	File Formats
;
; CALLING SEQUENCE:
;	Result = HDF_EXISTS()
;
; INPUTS:
;	None.
;
; KEYWORD PARAMETERS:
;	None.
;
; OUTPUTS:
;	Returns TRUE (1) if the HDF data format library is
;	supported. Returns FALSE(0) if it is not.
;
; EXAMPLE:
;	IF hdf_exists() EQ 0 THEN Fail,"HDF not supported on this machine"
;
; MODIFICATION HISTORY
;	Written by:	Joshua Goldstein,  12/21/92
;	Modified by:    Steve Penton,	   12/27/95
;
;-

;	A fake function if libraries don't exist
FUNCTION hdf_df24_lastref,x
	return,1
END

;
FUNCTION hdf_exists
	; CDF is not available in the IDL Student Edition.
	;
	; NOTE: The LMGR function is undocumented, considered private
	; to RSI, and is subject to change or removal from IDL at any
	; time without notice.
	if (LMGR(/STUDENT) eq 1) then return, 0

	exists=0
	x=hdf_df24_lastref();
	if x LE 0 THEN return,1
	return,0
END