next up previous contents index
Next: Command Line Interpretor Subroutines Up: SIC Callable Routines Previous: Monitor interface routines   Contents   Index

SIC Arguments Retrieving Routines

Available subroutines:
          SIC_L4          SIC_I4          SIC_R4          SIC_R8
          SIC_CH          SIC_KE          SIC_NEXT

Available functions:
          SIC_PRESENT     SIC_LEN         SIC_NARG        SIC_START

There are 5 retrieving routines following similar calling conventions

          Argument Data Type      Name of Subroutine
                REAL(KIND=8)            SIC_R8
                REAL(KIND=4)            SIC_R4
                INTEGER(KIND=4)         SIC_I4
                LOGICAL(KIND=4)         SIC_L4
                CHARACTER(LEN=*)        SIC_CH, SIC_KE

The calling syntax is the following
          CALL SIC_Name (LINE,IOPT,IARG,ARGUM,PRESENT,ERROR)
Except for SIC_CH and SIC_KE
          CALL SIC_CH   (LINE,IOPT,IARG,ARGUM,LARG,PRESENT,ERROR)
          CALL SIC_KE   (LINE,IOPT,IARG,ARGUM,LARG,PRESENT,ERROR)
SIC_KE is like SIC_CH, but expects a ``keyword'', and thus returns the argument after upper case conversion.

In addition there are other functions related to the arguments:

INTEGER FUNCTION SIC_NARG(IOPT)

returns the number of arguments present for option IOPT.

LOGICAL FUNCTION SIC_PRESENT(IOPT,IARG)

returns a logical value indicating the presence of the IARG-th argument of the IOPT-th option.

SUBROUTINE SIC_AMBIGS(FACILITY,NAME,FULL,VOCAB,MVOC,IVOC,ERROR)

search for NAME in the vocabulary VOCAB, and returns the corresponding pointer IVOC in the vocabulary and corresponding keyword FULL = VOCAB(IVOC) if NAME is a non-ambiguous abbreviation of FULL.

Typically, NAME will have been recovered by a call to SIC_KE

INTEGER FUNCTION SIC_LEN(IOPT,IARG)

returns the total length of the IARG-th argument of the IOPT-th option. Returns 0 if SIC_PRESENT(IOPT,IARG)=.FALSE.

INTEGER FUNCTION SIC_START(IOPT,IARG)

returns a pointer to the address of the argument in the character string. Returns 0 if SIC_PRESENT(IOPT,IARG)=.FALSE.. This routine can be used with SIC_LEN for special processing of arguments, such as sexagesimal decoding.

SUBROUTINE SIC_NEXT(LINE(NEXT:),ARGUM,LARG,NEXT)

This subroutine can be used for special processing of text with a syntax similar to command lines, i.e. text in which the delimiters are single spaces, strings being included between double quotes. Provided it is called with the text restricted to the current delimiter position LINE(NEXT:), it returns the position of the next delimiter NEXT (space, skipping strings), the character string included between these delimiters, ARGUM and its length LARG. This string may further be decoded as double precision value using routine SIC_MATH or SIC_SEXA, logical value using routine SIC_LOGICAL, or used as character constant.


next up previous contents index
Next: Command Line Interpretor Subroutines Up: SIC Callable Routines Previous: Monitor interface routines   Contents   Index
Gildas manager 2014-07-01