The default value of an optional parameter must be constant
This statement is true. In most programming languages, the default value of an optional parameter must be a constant value that is known at compile time. This is because the compiler needs to know the value of the default parameter when compiling the code, and it cannot determine the value at runtime. However, some programming languages allow for more flexibility in defining default values for optional parameters.
原文地址: http://www.cveoy.top/t/topic/djlp 著作权归作者所有。请勿转载和采集!