|
楼主 |
发表于 2011-7-12 15:58:35
|
显示全部楼层
自己做的一些模板 注释,if..else.. ,switch ,main.c ,头文件定义
#TEMPLATE "&Notes>&HEAD",&Name,"File &Name",&Description,&Version,&Created="xie",&date="$DATE$",&Built="$TOOLKIT_DIR$"
/*******************************************************************************
* Copyright 2008 HongLian 上海仪器发展有限公司
* All right reserved
*
* 文件名称:%1
*
* 文件标识:%2
* 摘 要:%3
*
*
* 当前版本:%4
* 作 者:%5
* 完成日期:%6
* 编译环境:%7
*
* 历史信息:
*******************************************************************************/
#TEMPLATE "&Statement>&ifndef","File &Name"
#ifndef __%1_H
#define __%1_H
%c
#endif
#TEMPLATE "&Statement>&if"
if( %c )
{
}
#TEMPLATE "&Statement>&if..else.."
if( %c )
{
}
else if
{
}
else
{
; // no value
}
#TEMPLATE "&Statement>&switch"
switch( %c )
{
case 0:
break;
default:
break;
}
#TEMPLATE &Statement>&for,"&End Value"=10,&Variable=i
for(unsigned int %2 = 0; %2 < %1; %2++)
{
%c
}
#TEMPLATE &Function>&Main,&name=Main,&Description=--,&Created="$DATE$, by xie"
/***********************************************************************************************************
* 函数名称: main()
* 功 能: %2
*
* 作 者: %3
************************************************************************************************************/
void main(void)
{
%c
while(1)
{
}
}
#TEMPLATE &Function>&Function,"Function &name","Input ¶meter","Out ¶meter",&Description=--,&Created="$DATE$, by xie"
/***********************************************************************************************************
* 函数名称: %1()
* 输入参数: %2
* 输出参数: %3
*
* 功 能: %4
*
* 作 者: %5
************************************************************************************************************/
uint32_t %3 %1(uint32_t %2)
{
%c
} |
|