Does moon have static and dynamic variables in the heap? [closed]

0

Does the storage binding (related to the lifetime of the variable) allow static variables? Allow dynamic heap variables?

    
asked by anonymous 07.04.2018 / 23:03

1 answer

2

There are some definitions of what static variable would be. Moon has no static variable mechanism, but it is powerful and flexible to achieve the same result through other mechanisms.

By default values are placed in heap through dynamic allocation and variables can point to these values. You use local to switch to automatic allocation in stack .

    
08.04.2018 / 23:51