- Local time
- Yesterday, 19:10
- Joined
- Feb 28, 2001
- Messages
- 30,337
I had occasion to define a data structure using the Type declaration and also had to define an enumerated list of values that one of the Type's members could assume. So ...
I did the Enum like this:
All was well in the world and I started coding. But then, I was typing and was going to use Intellisense to correct my capitalization. In the body of my code, I typed 'bp_reversed' for something intending for the text to become 'BP_Reversed' - but instead the definition inside the Enum block became all lower-case! The tail wagged the dog!
OK, the fix is trivial - go back to the Enum definition block and retype the names in the intended mixed case. Then the references in the code body get fixed up just fine. So this falls into the category of Annoyance, not fatal error.
The same thing happened when I used the Type declaration with mixed case, but then wanted Intellisense to match case with the declaration. Same problem occurred - had to go back and retype the definition to get the references in the code body to reset to the correct capitalization.
And it should be noted that resetting the definitions DID in fact reset the capitalization elsewhere in the document, so automatic corrections WERE working. I was just surprised that the reference changed the definition as easily as changing the definitions changed the references. I didn't think it was supposed to work that way.
Has anyone else seen this kind of behavior?
I did the Enum like this:
Code:
Enum Btn_Move
BP_NoMovement
BP_Conventional
BP_Reversed
...
End Enum
All was well in the world and I started coding. But then, I was typing and was going to use Intellisense to correct my capitalization. In the body of my code, I typed 'bp_reversed' for something intending for the text to become 'BP_Reversed' - but instead the definition inside the Enum block became all lower-case! The tail wagged the dog!
OK, the fix is trivial - go back to the Enum definition block and retype the names in the intended mixed case. Then the references in the code body get fixed up just fine. So this falls into the category of Annoyance, not fatal error.
The same thing happened when I used the Type declaration with mixed case, but then wanted Intellisense to match case with the declaration. Same problem occurred - had to go back and retype the definition to get the references in the code body to reset to the correct capitalization.
And it should be noted that resetting the definitions DID in fact reset the capitalization elsewhere in the document, so automatic corrections WERE working. I was just surprised that the reference changed the definition as easily as changing the definitions changed the references. I didn't think it was supposed to work that way.
Has anyone else seen this kind of behavior?