我的变量命名约定有名称吗? [英] Does my variable naming convention have a name?

查看:149
本文介绍了我的变量命名约定有名称吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我通过这个Delphi的命名方案开始于A,类vars从F开始,本地vars从M开始。那个方案有一个名字吗?我在Delphi源代码中看到很多,我想阅读更多关于它,但我不知道它叫什么。

解决方案

这种编码风格在 Object Pascal Style Guide ,因为不是是匈牙利语符号(除了一个例外,枚举类型。)



您正在谈论的特定编码约定没有名称据我所知,这只是你正在编写符合CodeGear(旧Borland)编码风格指南的代码。该指南似乎没有给风格一个名字。



你在Delphi源码中看到很多的原因是因为本指南是基于编码风格Delphi团队开发了!



这个文件非常值得一读,不仅仅是为了代码指导,而且也引起了其他提到的兴趣。


So I go by this Delphi naming scheme of arguments start with A, class vars start with F and local vars start with M. Does that scheme have a name? I see it a lot in the Delphi source I'd like to read more about it but I'm not sure what it's called.

解决方案

This coding style is specifically called out in the Object Pascal Style Guide as not being Hungarian notation (with one exception, enumerated types.)

The specific coding conventions you're talking about don't have a name as such, as far as I know, it's simply that you're writing code conforming to the CodeGear (old Borland) coding style guide. The guide doesn't seem to give the style a name.

The reason you see it a lot in the Delphi source is because this guide is based on the coding style the Delphi team developed!

This document's well worth reading - not only for code guidelines but also out of interest for other things it mentions.

这篇关于我的变量命名约定有名称吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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