メインコンテンツまでスキップ
バージョン:25.2

container

  • keyword
  • container x -- synonym for "reference to x”
  • the container referred to by x, container referenced by x — if x is a reference, obtains the container that x refers to in a way that allows setting that value to be a reference to something else
    • from the 1.29 release notes:
    • Changed references to not carry through on assignment. If x is a reference to var1, resetting x as a reference to var2 will now redirect x, it will not affect var1. To explain this change in more detail: previously, setting x to refer to var2 would actually set var1 to refer to var2, with x still referring to var1 and therefore (indirectly) to var2; now, x will be reset to refer directly to var2, without affecting var1.

    If the old behavior is needed, a new syntax allows explicitly setting the value referred to: (the) [value | container] [referred to | referenced] by. For the example above, the old behavior could be achieved as follows:

         set x to be a reference to var1
set the container referred to by x to refer to var2