The use of global variables

xiaoxiao2021-03-06  99

Global variables can be initialized to a value directly in a VAR clause. Remember, all global data will automatically initialize 0, so do not initialize global variables to a "empty" value such as 0, nil, '', unassigned, and so on. One reason why this is because zero-initialization global data will not occupy any space in the EXE file. The "empty" value-initialization data is stored in a virtual data segment, which is assigned in a period of memory after the application is started. Non-zero-initialized global data takes up in the exe file of the hard disk.

转载请注明原文地址:https://www.9cbs.com/read-123115.html

New Post(0)