Special functions may be used with the command COMPUTE/KEYWORD. The currently supported functions are listed in the following tables (on the next pages). Note, that arg1, arg2 may either be the name of a keyword, the contents of which are used, or a constant. Character constants have to be enclosed in double quotes to distinguish them from a keyword name. On-line help for these functions is available via HELP COMPUTE/KEYWORD.
|
!+The MIDAS commands @@ exa16 test as well as @@ exa16 test.mt will both display the header of the FITS file test.mt. Note, that this procedure will display the header in a user friendly way, i.e. one screen at a time (and only work for Unix).
! Example 16, MIDAS procedure exa16.prg
!+
DEFINE/PARAM P1 ? ? "Enter FITS file name:"
!
DEFINE/LOCAL INA/C/1/80 " " all ! that fills all elements of INA with blanks
DEFINE/LOCAL K/I/1/2 0,0
!
K = M$INDEX(P1,".mt") ! test, if type of FITS file entered
IF K .LT. 2 THEN
WRITE/KEYW INA P1.mt ! if not, append type
ELSE
WRITE/KEYW INA P1! if yes, no need to append type
ENDIF
INTAPE/FITS 1 midd ina fnn | $more
! but if we want to save the no. of axes of the FITS file
! we do not use the keyword name INA but it's contents
K = M$VALUE(ina,naxis)
WRITE/OUT we have K axes