What does vb6 initialize a static Integer to?

前端 未结 2 1006
死守一世寂寞
死守一世寂寞 2021-01-27 02:46
Static i as integer

What will i be before I assign a value.

It seems to be just zero (0) but I wanted to confirm that.

2条回答
  •  萌比男神i
    2021-01-27 03:10

    Variables of all VB data types receive their respective default value when the procedure starts.

    This includes initializing all numbers to zero, and all the other data types to their flavour of zero (vbNullString for strings, not exactly the same as an empty string "", False for booleans, Empty for variants, and Nothing for objects).

提交回复
热议问题