02-16-2004, 03:02 AM
I guess whatever practice works for people is best
For me, whenever I create a variable, I already know what its type is and I don't have to refer to its declaration. With older code, if I've forgotten what type it is, I look at how I used it. I also rarely use SINGLEs or DOUBLEs, and LONGs are only used for things I know I'll need the space for. In VB, I use BYTEs whenever I need very small values, plus in VB, you can just right-click and get Quick Info on the variable to get its type if you don't know what it is. Of course, you can also hit F1 with the cursor on the variable in the QB IDE for a similar effect.
For me, whenever I create a variable, I already know what its type is and I don't have to refer to its declaration. With older code, if I've forgotten what type it is, I look at how I used it. I also rarely use SINGLEs or DOUBLEs, and LONGs are only used for things I know I'll need the space for. In VB, I use BYTEs whenever I need very small values, plus in VB, you can just right-click and get Quick Info on the variable to get its type if you don't know what it is. Of course, you can also hit F1 with the cursor on the variable in the QB IDE for a similar effect.
I'd knock on wood, but my desk is particle board.