; $Id: hdf_exists.pro,v 1.9 2001/01/15 22:28:05 scottm Exp $ ; ; Copyright (c) 1992-2001, 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 ; Scott Lasica 8/4/99 ;- ; FUNCTION hdf_exists ; SDFs are 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 catch, no_hdf_lib if (no_hdf_lib ne 0) then begin return, 0 endif a = HDF_OPEN('exist_test',/READ) return, 1 END