AssociateBlockCall

Runs the body of an associate construct.

声明

语法

AssociateBlockCall(symbol m)

参数

Argument

描述

m

the AssociateBlock symbol holding the scope and the statements.

返回值

无。

描述

Like BlockCall, this marks where the construct runs while the scope and the statements live in the symbol.

示例

(AssociateBlockCall
  :m (SymbolRef 1 "block")
)

It comes from this complete ASR text document:

(TranslationUnit
  :symtab (SymbolTable
    :id 0
    :symbols {
      "main" (Program
        :symtab (SymbolTable
          :id 1
          :symbols {
            "block" (AssociateBlock
              :symtab (SymbolTable
                :id 2
                :symbols {
                  "k" (Variable
                    :parent_symtab 2
                    :name "k"
                    :dependencies []
                    :intent :Local
                    :symbolic_value nil
                    :value nil
                    :storage :Default
                    :type (Integer
                      :kind 4
                    )
                    :type_declaration nil
                    :abi :Source
                    :access :Public
                    :presence :Required
                    :value_attr false
                    :target_attr false
                    :contiguous_attr false
                    :bindc_name nil
                    :is_volatile false
                    :is_protected false
                    :pass_attr :NotMethod
                    :self_argument nil
                    :codims []
                  )
                }
              )
              :name "block"
              :body [
                (Associate
                  :target (Var
                    :v (SymbolRef 2 "k")
                  )
                  :value (Var
                    :v (SymbolRef 1 "x")
                  )
                )
                (Assignment
                  :target (Var
                    :v (SymbolRef 2 "k")
                  )
                  :value (IntegerConstant
                    :n 1
                    :type (Integer
                      :kind 4
                    )
                    :intboz_type :Decimal
                  )
                  :overloaded nil
                  :realloc_lhs false
                  :move_allocation false
                )
              ]
            )
            "x" (Variable
              :parent_symtab 1
              :name "x"
              :dependencies []
              :intent :Local
              :symbolic_value nil
              :value nil
              :storage :Default
              :type (Integer
                :kind 4
              )
              :type_declaration nil
              :abi :Source
              :access :Public
              :presence :Required
              :value_attr false
              :target_attr false
              :contiguous_attr false
              :bindc_name nil
              :is_volatile false
              :is_protected false
              :pass_attr :NotMethod
              :self_argument nil
              :codims []
            )
          }
        )
        :name "main"
        :dependencies []
        :body [
          (AssociateBlockCall
            :m (SymbolRef 1 "block")
          )
        ]
      )
    }
  )
  :items []
)

也可以看看

AssociateBlock, BlockCall, Associate