VB6 Editor changing case of variable names

前端 未结 10 944
迷失自我
迷失自我 2020-12-08 13:24

I\'m not much of a Visual Basic person, but I am tasked with maintaining an old VB6 app. Whenever I check out a file, the editor will replace a bunch of the uppercase varia

10条回答
  •  温柔的废话
    2020-12-08 13:55

    Continuing from DJ's answer...

    And it won't only change the case of variables in the same scope either.

    It will change the case of all variables with the same name in your entire project. So even if they're declared in uppercase in one place, another module might have different variables using the same variable names in lowercase, causing all variables in your project to change to lowercase, depending on which of the declarations was loaded (?) or edited last.

    So the reason your C and X variables are changing case, while the Y isn't, is probably because C and X are declared somewhere else in your project too, but in lowercase, while Y isn't.

    There's another mention of it here, where they mostly seem concerned with such variable names conflicting when case is being used to differentiate local from global variables. They end up going for prefixes instead.

    The only alternative I can think of is to use some other editor with VB6-highlighting capabilities to do your editing...

提交回复
热议问题