FUNCTION FXBISOPEN,UNIT ; @fxbintable ON_ERROR, 2 ; ; Check the number of parameters. ; IF N_PARAMS() NE 1 THEN MESSAGE,'Syntax: Result = FXBISOPEN(UNIT)' ; ; If UNIT is undefined, then return False. ; IF N_ELEMENTS(UNIT) EQ 0 THEN RETURN, 0 ; ; Check the validity of UNIT. ; IF N_ELEMENTS(UNIT) GT 1 THEN MESSAGE,'UNIT must be a scalar' SZ = SIZE(UNIT) IF SZ[SZ[0]+1] GT 3 THEN MESSAGE,'UNIT must be an integer' ; ; Get the state associated with UNIT. ; ILUN = FXBFINDLUN(UNIT) RETURN, STATE[ILUN] EQ 1 ; END