|
1.注释 (与c,c++相同)
//--- 单行线注释
/* Multi-
line // 嵌入式单行线注释
comment
*/
|
2.关键词
数据类型
bool
| float
| uint
| char
| int
| ulong
| class
| long
| union
| color
| short
| ushort
| datetime
| string
| void
| double
| struct
|
| enum
| uchar
|
|
访问分类符
const
| private
| virtual
| delete
| protected
|
| override
| public
|
|
存储类型
操作符
break
| dynamic_cast
| operator
| case
| else
| pack
| continue
| for
| return
| default
| if
| sizeof
| delete
| new
| switch
| do
| offsetof
| while
|
其他
this
| #define
| #import
| true
| #ifdef
| #include
| false
| #ifndef
| #property
| template
| #else
| group
| typename
| #endif
| namespace
|
3.标识符
*.长度不能超过63个字节。
*.字符可包括数字0-9、拉丁字母大写A-Z和小写a-z(大小写有区分的)还有下划线(_)。
*.首字符不可以是数字。
*.标识符不能和 保留字冲突。
示例: NAME1 namel Total_5 Paper _05
4.函数
int start()
{
double some_array[4]={0.3, 1.4, 2.5, 3.6};
double a=linfunc(some_array, 10.5, 8);
double a=linfunc(some_array, 10.5); //...
}
double linfunc(double x[], double a, double b=0.1) //带参数函数
{
return (a*x[0] + b);
}
声明:以上内容来源于网络,如有侵权请联系我们(123@shiyan.com)删除! |
|