F$PARTYP()

Description

F$PARTYP() is used to retrieve the "type" of the provided identifier.

Call Signature

string F$PARTYP ( identifier target_ident )

Return Value

string

The return value for variables of intrinsic types, functions, or parameters will be a "type string" (see Remarks). The return value for variables of derived types will be the name of the user defined type.

Argument

identifier target_ident:

Identifier being queried. This must be the name of the variable, type, class, or function and cannot be an expression of any kind.

Remarks

Type strings:


  "C":         A character parameter.
  "N":         A numeric parameter.
  "STRING:     A string variable.
  "MSTRING:    A multi-line string variable.
  "INTRINSIC": An intrinsic function.
  "FUNCTION":  A user defined function.
  "INTEGER":   An integer variable.
  "FLOAT":     A float variable.
  "DOUBLE":    A double precision variable.
  "BYTE":      A eight bit unsigned byte variable.
  "CHAR":      A character variable.

Historically this identifier was only a parameter but F$PARTYP has been extended to operate on many types of EASI identifiers.

Example

One use for F$PARTYP() is to ensure that the arguments to a user defined function are of an appropriate type. The following example checks that the argument is a reasonable scalar numeric type before proceeding.


  define function isprime( a )
    if( f$partyp(a) != "DOUBLE" OR f$len(a) > 1 )then
      print "Illegal argument to isprime()"
      return
    endif
    ...
  enddefine

See also

F$PARMIN()

F$PARMAX()

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.