Skip to main content
Engineering LibreTexts

24.7: System Information Functions

  • Page ID
    54405
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    The following table provides a list of intrinsic functions that obtain information from the system.

    Function Description
    COMMAND_ARGUMENT_COUNT() Returns the number of command line arguments.
    GET_COMMAND_ARGUMENT(NUMBER, VALUE, LENGTH, STATUS) Returns the command line arguments, if any.
    • NUMBER, integer argument of the number to return. Must be between 1 and COMMAND_ARGUMENT_COUNT().
    • VALUE, character(*), Nth argument
    • LENGTH, integer, length of argument returned in VALUE
    • STATUS, integer, status, 0=success and -1=VALUE character array is too small for argument, other values=retrieval failed
    CPU_TIME(TIME) Returns the amount of CPU time expended on the current program in seconds. TIME is return as a real value.
    DATE_AND_TIME(DATE, TIME,ZONE,VALUES) Return the date and time.
    • DATE(), character(8), string in the form YYYYMMDD, where YYYY is year, MM is month, and DD is date.
    • TIME(), character(10), string in the form HHMMSS.SSS where HH is hour, MM is minute, SS is second, and SSS is millisecond.
    • ZONE(), character(5), string in the form of \(\pm\)HHMM, where HHMM is the time difference between local time and Coordination Universal Time.
    • VALUES(), integer array where
      • VALUES(1) \(\rightarrow\) year
      • VALUES(2) \(\rightarrow\) month (1-12)
      • VALUES(3) \(\rightarrow\) date (1-31)
      • VALUES(4) \(\rightarrow\) time zone difference (minutes)
      • VALUES(5) \(\rightarrow\) hour (0-23)
      • VALUES(6) \(\rightarrow\) minutes
      • VALUES(7) \(\rightarrow\) seconds (0-59)
      • VALUES(8) \(\rightarrow\) milleseconds (0-999)
    Each argument is optional, but at least one argument must be included.

    This page titled 24.7: System Information Functions is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Ed Jorgensen via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?