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

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

问题描述

我不是一个Visual Basic的人,但我的任务是维护一个旧的VB6应用程序。每当我签出一个文件时,编辑器会自动用小写替换一堆大写的变量名。我怎么能停下来!?我不想让它们全部改回来,当我试图找出真正的差异时,让这些变化出现在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,因为Control变为Dim c作为Control。 Dim X&变得暗淡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?

推荐答案

继续 DJ的答案 ...

它不仅会改变同一范围内的变量的情况。

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天全站免登陆