谁能为C语言的关键字建立一张好的哈希表

来源:百度知道 编辑:UC知道 时间:2024/05/13 18:38:09
ANSI标准定义的共32个
auto double int struct break else
long switch case enum register typedef
char extern return union const float
short unsigned continue for signed void
default goto sizeof volatile do if
while static

Const(常数) Dim(定义) As(为) Mod(取模)

And(并且) Or(或者) Not(非)

If (如果) Then(那么) Else(否则)

Stop(停止) End(结束)

Select(选择) Case(条件) Is (是)

For(计数) To(到) Step(步长)

Byref(传址) Byval(传值)

Sub(子程序) Function(函数) Exit(退出)

Do(做) Loop(循环) Until(除非) While(当) Wend(当结束)

Let(让) Call(调用)

Rem(注释)
Integer(整数) Long(长整数) Single(单精度小数) Double(双精度,小数) Boolean(布尔) String(字符串,文字)

volatile void union typedef typedef switch, case, default struct
static sizeof short, long, signed, unsigned
return register goto extern enum const

我帮你找到了:
unsigned int HashString(char *string)
{
register unsigned int result;
register int c;

result = 0;
while (1)
{
c = *string;
string++;
if (c == 0)
{
break;
}