VB6编辑器更改变量名称的大小写 [英] VB6 Editor changing case of variable names

查看:102
本文介绍了VB6编辑器更改变量名称的大小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是一个Visual Basic的人,但是我的任务是维护一个旧的VB6应用程序.每当我检出文件时,编辑器都会自动将一堆大写的变量名替换为小写.我该如何停止!!我不想将它们全部变回原来的位置,当我试图找到REAL差异时,要在SourceSafe差异"中显示这些变化是很痛苦的.

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 variable names with lowercase automatically. How can I make this stop!? I don't want to have to change them all back, and it's a pain to have these changes show up in SourceSafe "Differences" when I'm trying to locate the REAL differences.

它也在定义中自动更改: Dim C as Control变为Dim c as Control. Dim X&变为Dim x&.但是,它并非始终如此.例如,从Dim x&向下三行,有一个Dim Y&大写字母,它没有变化.为什么要对我这样做?

It is changing it automatically in the definition, too: Dim C as Control becomes Dim c as Control. Dim X& becomes Dim x&. But it doesn't do it all the time; for example, three lines down from Dim x&, there's a Dim Y&, uppercase, which it did not change. Why's it do this to me?

推荐答案

而且它不仅会改变相同作用域中变量的大小写.

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.

所以C和X变量改变大小写而Y不变的原因可能是因为C和X也在项目的其他位置声明了,但小写的时候Y却没有声明.

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.

我唯一想到的替代方法是使用其他具有VB6突出显示功能的编辑器来进行编辑...

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

这篇关于VB6编辑器更改变量名称的大小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆