Function: GDSBOX Purpose: GDSBOX prompts the user to define a box inside/around a subset. Category: USER IO, PHYSICAL COORDINATES File: gdsbox.c Author: K.G. Begeman Use: CALL GDSBOX( BLO , In/Output integer array BHI , In/Output integer array SET , Input character*(*) SUBSET , Input integer DEFAULT , Input integer KEYWORD , In/Output character*(*) MESSAGE , Input character*(*) SHOWDEV , Input integer OPTION ) Input integer BLO On input this array may contain the default centre or the default lower left edge of the box (depends on OPTION). On output it contains the user defined lower left grid coordinates of the box. BHI On input this array may contain the default size or the default upper right edge of the box (depends on OPTION). On output it contains the user defined upper right grid coordinates of the box. SET Name of set for which a box should be defined. SUBSET Coordinate word of the subset for which a box should be defined. DEFAULT Default code as in USERxxx. KEYWORD Keyword prompts the user to enter a box. If KEYWORD is blank the GDSBOX will prompt with 'BOX='. MESS Message for the user. If MESS is blank then GDSBOX will generate its own message. SHOWDEV Device (as in ANYOUT) to which some info about the chosen box is displayed. OPTION The different options are: 1 box may exceed subset size 2 default is in BLO 4 default is in BHI 8 box restricted to size defined in BHI 16 return immediately in case of errors These codes work additive. So when OPTION = 0 or 1 then the default is entire subset. If option 16 is set, then in case of errors this argument will be set to -1 and GDSBOX will return immediately. Description: GDSBOX is a subroutine which prompts the user to enter a box around/inside a subset. It always follows upon a call to GDSINP. The input syntax is described in document dcdpos.dc3. Related Docs: dcdpos.dc3 Updates: Feb 1, 1990: KGB, Document created. Dec 11, 1991: KGB, cancel replaced by reject. Nov 7, 1997: JPT, Option 16 inplemented. Apr 09, 2009: VOG, Replaced NINT definition with one that uses floor(). Several other routines dealing with coordinates now use the same definition. The routines now can deal properly with CRPIX values that end on 0.5 (tested for both negative and positive CRPIX)