# GET_TEAM

Transformational Intrinsic Function (Generic): Returns a copy of a team variable.

## Syntax

result = GET_TEAM ([ level ])

level | (Optional, Input) Must be a scalar integer whose value is equal to one of the named constants INITIAL_TEAM, CURRENT_TEAM, or PARENT_TEAM defined in the ISO_FORTRAN_ENV intrinsic module.

## Results

The result is type TEAM_TYPE from the ISO_FORTRAN_ENV intrinsic module. If level is not present, or if CURRENT_TEAM is specified, the result is a team variable describing the current team. If level has the value PARENT_TEAM, the result is a team variable describing the parent team of the current team. If level has the value INITIAL_TEAM, the result is a team variable describing the initial team.

## Example

Consider the following program fragment:

      PROGRAM main
      USE, INTRINSIC       :: ISO_FORTRAN_ENV
      TYPE (TEAM_TYPE)     :: original
      original = GET_TEAM (INITIAL_TEAM)

After execution of the GET_TEAM function, `original` is defined with a team value describing the initial team.

Parent topic: G