Search code examples
arraysfortranargumentssubroutine

what does (/ value /) mean? value is an input argument for a subroutine


I am reading a Fortran code, inside it I don't understand why we use (/value/) instead of value. Could you please explain what is the difference? I do not know what does (/ /) do.

CALL BOUNDARY_CONDITIONS_SET(BOUNDARY_CONDITIONS,(/DOF_INDEX/),(/CONDITION/), &
   & (/VALUE/))

Thanks.


Solution

  • I assume that the routine expects an array, not values, as parameters.

    (/ a, b, c /) creates an array with 3 elements: a, b, and c.

    (/DOF_INDEX/) creates an array of length 1, with its only element being the value of DOF_INDEX.