BOOLEAN var initially FALSE?

R

Rick Charnes

Just to confirm: when I first declare a boolean var --

DIM myvar AS BOOLEAN

myvar has an initial value of FALSE without my doing anything, right?
 
C

Chad DeMeyer

Correct.
Although, I've heard that it's bad programming practice not to explicitly
initialize variables.
But I've been known to neglect that step.

Regards,
Chad
 
J

Jay Freedman

Rick said:
Just to confirm: when I first declare a boolean var --

DIM myvar AS BOOLEAN

myvar has an initial value of FALSE without my doing anything, right?

Hi Rick,

Yes, that's correct. However, it costs very little to assign it explicitly
at the beginning of the macro, and could be helpful to a human reader trying
to understand the code.
 
Top