# S

This section describes language features that start with S.

Parent topic: A to Z Reference

- SAME_TYPE_AS
  Inquiry Intrinsic Function (Generic): Inquires whether the dynamic type of one object is the same as the dynamic type of another object.
- SAVE
  Statement and Attribute: Causes the values and definition of objects to be retained after execution of a RETURN or END statement in a subprogram.
- SCALE
  Elemental Intrinsic Function (Generic): Returns the value of the exponent part (of the model for the argument) changed by a specified value.
- SCAN Directive
  OpenMP* Fortran Compiler Directive: Specifies a scan computation that updates each list item in each iteration of the loop.
- SCAN Function
  Elemental Intrinsic Function (Generic): Scans a string for any character in a set of characters.
- SCANENV
  Portability Subroutine: Scans the environment for the value of an environment variable.
- SCWRQQ
  Portability Subroutine: Returns the floating-point processor control word.
- SECNDS Intrinsic Procedure
  Elemental Intrinsic Function (Generic): Provides the system time of day, or elapsed time, as a floating-point value in seconds. SECNDS can be used as an intrinsic function or as a portability routine. It is an intrinsic procedure unless you specify USE IFPORT.
- SECNDS Portability Routine
  Portability Function: Returns the number of seconds that have elapsed since midnight, less the value of its argument. SECNDS can be used as a portability function or as an intrinsic procedure. It is an intrinsic procedure unless you specify USE IFPORT.
- SECTIONS
  OpenMP* Fortran Compiler Directive: Specifies that the enclosed SECTION directives define blocks of code to be divided among threads in a team. Each section is executed once by a thread in the team.
- SEED
  Portability Subroutine: Changes the starting point of the pseudorandom number generator.
- SELECT CASE and END SELECT
  Statement: Transfers program control to a selected block of statements according to the value of a controlling expression.
- SELECT RANK
  Statement: Marks the beginning of a SELECT RANK construct. The construct selects for execution at most one of its constituent blocks. The selection is based on the rank of an assumed-rank variable.
- SELECT TYPE
  Statement: Marks the beginning of a SELECT TYPE construct. The construct selects for execution at most one of its constituent blocks. The selection is based on the dynamic type of a specified expression.
- SELECTED_CHAR_KIND
  Transformational Intrinsic Function (Generic): Returns the value of the kind type parameter of the character set named by the argument.
- SELECTED_INT_KIND
  Transformational Intrinsic Function (Generic): Returns the value of the kind parameter of an integer data type.
- SELECTED_REAL_KIND
  Transformational Intrinsic Function (Generic): Returns the value of the kind parameter of a real data type.
- SEQUENCE
  Statement: Preserves the storage order of a derived-type definition.
- SETCONTROLFPQQ
  Portability Subroutine: Sets the value of the floating-point processor control word.
- SETDAT
  Portability Function: Sets the system date. This function is only available on Windows* and Linux* systems.
- SETENVQQ
  Portability Function: Sets the value of an existing environment variable, or adds and sets a new environment variable.
- SETERRORMODEQQ
  Portability Subroutine: Sets the prompt mode for critical errors that by default generate system prompts.
- SET_EXPONENT
  Elemental Intrinsic Function (Generic): Returns the value of the exponent part (of the model for the argument) set to a specified value.
- SETFILEACCESSQQ
  Portability Function: Sets the file access mode for a specified file.
- SETFILETIMEQQ
  Portability Function: Sets the modification time for a specified file.
- SETTIM
  Portability Function: Sets the system time in your programs. This function is only available on Windows* and Linux* systems.
- SHAPE
  Inquiry Intrinsic Function (Generic): Returns the shape of an array or scalar argument.
- SHARED Clause
  Parallel Directive Clause: Specifies variables that will be shared by all the threads in a team.
- SHIFTA
  Elemental Intrinsic Function (Specific): Performs a right shift with fill. This function cannot be passed as an actual argument.
- SHIFTL
  Elemental Intrinsic Function (Specific): Logically shifts an integer left by a specified number of bits. This function cannot be passed as an actual argument.
- SHIFTR
  Elemental Intrinsic Function (Specific): Logically shifts an integer right by a specified number of bits. This function cannot be passed as an actual argument.
- SHORT
  Portability Function: Converts an INTEGER(4) argument to INTEGER(2) type.
- SIGN
  Elemental Intrinsic Function (Generic): Returns the absolute value of the first argument times the sign of the second argument.
- SIGNAL
  Portability Function: Controls interrupt signal handling and changes the action for a specified signal.
- SIGNALQQ
  Portability Function: Registers the function to be called if an interrupt signal occurs.
- SIMD Directive (OpenMP* API)
  OpenMP* Fortran Compiler Directive: Transforms a loop into a loop that will be executed concurrently using Single Instruction Multiple Data (SIMD) instructions.
- SIMD Loop Directive
  General Compiler Directive: Requires and controls SIMD vectorization of loops. This directive is deprecated and will be removed in a future release.
- SIN
  Elemental Intrinsic Function (Generic): Produces the sine of an argument.
- SIND
  Elemental Intrinsic Function (Generic): Produces the sine of an argument.
- SINGLE
  OpenMP* Fortran Compiler Directive: Specifies that a block of code is to be executed by only one thread in the team at a time.
- SINH
  Elemental Intrinsic Function (Generic): Produces a hyperbolic sine.
- SIZE Function
  Inquiry Intrinsic Function (Generic): Returns the total number of elements in an array, or the extent of an array along a specified dimension.
- SIZEOF
  Inquiry Intrinsic Function (Generic): Returns the number of bytes of storage used by the argument. It cannot be passed as an actual argument.
- SLEEP
  Portability Subroutine: Suspends the execution of a process for a specified interval.
- SLEEPQQ
  Portability Subroutine: Delays execution of the program for a specified duration.
- SNGL
  Converts a REAL value to a default REAL result.
- SORTQQ
  Portability Subroutine: Sorts a one-dimensional array. The array elements cannot be derived types or record structures.
- SPACING
  Elemental Intrinsic Function (Generic): Returns the absolute spacing of model numbers near the argument value.
- SPLITPATHQQ
  Portability Function: Breaks a file path or directory path into its components.
- SPREAD
  Transformational Intrinsic Function (Generic): Creates a replicated array with an added dimension by making copies of existing elements along a specified dimension.
- SQRT
  Elemental Intrinsic Function (Generic): Produces the square root of its argument.
- SRAND
  Portability Subroutine: Seeds the random number generator used with IRAND and RAND.
- SSWRQQ
  Portability Subroutine: Returns the floating-point processor status word.
- STAT
  Portability Function: Returns detailed information about a file.
- Statement Function
  Statement: Defines a function in a single statement in the same program unit in which the procedure is referenced.
- STATIC
  Statement and Attribute: Controls the storage allocation of variables in subprograms (as does AUTOMATIC). Variables declared as STATIC and allocated in memory reside in the static storage area, rather than in the stack storage area.
- STOP and ERROR STOP
  Statements: The STOP statement initiates normal termination of an image before the execution of an END statement of the main program. The ERROR STOP statement initiates error termination.
- STOPPED_IMAGES
  Transformational Intrinsic Function (Generic): Returns an array of index images that have initiated normal termination.
- STORAGE_SIZE
  Inquiry Intrinsic Function (Generic): Returns the storage size in bits.
- STRICT and NOSTRICT
  General Compiler Directive: STRICT disables language features not found in the language standard specified on the command line (Fortran 2018, Fortran 2008, Fortran 2003, Fortran 95, or Fortran 90). NOSTRICT (the default) enables these features.
- STRUCTURE and END STRUCTURE
  Statement: Defines the field names, types of data within fields, and order and alignment of fields within a record structure. Fields and structures can be initialized, but records cannot be initialized.
- SUBDEVICE
  Parallel Directive Clause: Specifies which tiles or compute slices (c-slices) of the offload device the offloaded code will run on. This feature is only available for ifx.
- SUBMODULE
  Statement: Marks the beginning of a submodule program unit, which contains specifications and definitions that can be used by one or more program units.
- SUBROUTINE
  Statement: The initial statement of a subroutine subprogram. A subroutine subprogram is invoked in a CALL statement or by a defined assignment or operator, and does not return a particular value.
- SUM
  Transformational Intrinsic Function (Generic): Returns the sum of all the elements in an entire array or in a specified dimension of an array.
- SYNC ALL
  Statement: Performs a synchronization of all images on the current team.
- SYNC IMAGES
  Statement: Performs a synchronization of the image with each of the other images in the image set.
- SYNC MEMORY
  Statement: Ends one image segment and begins another. Each segment can then be ordered in some way with respect to segments on other images.
- SYNC TEAM
  Statement: Performs a synchronization of all images on the specified team.
- SYSTEM
  Portability Function: Sends a command to the shell as if it had been typed at the command line.
- SYSTEM_CLOCK
  Intrinsic Subroutine: Returns data from a real-time clock. SYSTEM_CLOCK returns the number of seconds from 00:00 Coordinated Universal Time (CUT) on 1 JAN 1970. The number is returned with no bias. To get the elapsed time, you must call SYSTEM_CLOCK twice, and subtract the starting time value from the ending time value.
- SYSTEMQQ
  Portability Function: Executes a system command by passing a command string to the operating system's command interpreter.