变量名称? [英] Variable Names ?
本文介绍了变量名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发现命名变量越来越难了。
我无法以正确的方式思考。
专家C程序员请帮忙。
问候,
James
Hi,
I am finding it increasingly difficult to name my variables.
I am not able to think in the right way.
Expert C programmers please Help.
Regards,
James
推荐答案
这是一个风格问题..
我经常使用这个:
int iCounter,i,j,iFlag;
int nMax,nMin,nCount,n,k;
char * szName,* Buffer,p,pName,pBuffer2 ;
double dblX,dblY,dblZ;
希望有所帮助,
Elias
Hi,
It is a matter of style..
I often use this:
int iCounter, i, j, iFlag;
int nMax, nMin, nCount, n, k;
char *szName, *Buffer, p, pName, pBuffer2;
double dblX, dblY, dblZ;
hope that helps,
Elias
2003年4月4日下午1:42,詹姆斯写道:
On 8/4/2003 1:42 PM, James wrote:
我找到了它越来越难以命名我的变量。
我无法以正确的方式思考。
Hi,
I am finding it increasingly difficult to name my variables.
I am not able to think in the right way.
您可以尝试根据他们存在的目的命名它们或
他们所代表的财产!
例如
int int1,int2;
浮动div;
div = int1%int2;
You can try naming them by their purpose of existance or
property they represent !
e.g.
int int1, int2;
float div;
div = int1%int2;
lallous < LA ***** @ lgwm.org>在消息中写道
news:bg ************ @ ID-161723.news.uni-berlin.de ...
"lallous" <la*****@lgwm.org> wrote in message
news:bg************@ID-161723.news.uni-berlin.de...
你好,
这是一个风格问题..
我经常使用这个:
int iCounter,i,j,iFlag;
int nMax,nMin,nCount,n,k;
char * szName,* Buffer,p,pName,pBuffer2;
double dblX,dblY,dblZ;
希望帮助,
Elias
Hi,
It is a matter of style..
I often use this:
int iCounter, i, j, iFlag;
int nMax, nMin, nCount, n, k;
char *szName, *Buffer, p, pName, pBuffer2;
double dblX, dblY, dblZ;
hope that helps,
Elias
只是一个小小的补充 - 如果你使用全局变量然后我
用g或g前缀它们
例如
char gszAppName [] =" ..." ;;
Allan
Just a small addition to this - if you are using global variables then I
prefix them with g or g_
e.g.
char gszAppName[] = "...";
Allan
这篇关于变量名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文