一般的程序错误,粗略一点分的话,可以大致分为语法错误和语义错误。
语法错误可以看作是编码出现了违反C语言规则的错误,一般编译或者链接时,
都会报错的。
而语义错误,也可以叫做逻辑错误,
也就是说你的代码完全符合C语言的规范,不会出现编译/链接的错误,
但是,在逻辑上有错误。
举个简单的例子,
加入编一个代码来统计int数组a的成员总和,成员总数为N:
for(int i=0;i<N;i++;) //这里在i++后面多了一个分号,这是语法错误
sum=sum+a[i];
for(int i=0;i<=N;i++) //这里多了一个i=N的取值,这是语义错误
sum=sum+a[i];
语言学范畴里的语义是指语用意义
语用意义是指话语在语言意义的基础上由于语言使用者及语境的作用而产生的意义.
所谓语义错误通俗点说就是语言使用者在一定的语境中对语言的使用出现了错误
http错误包括很多种404是找不到网页403是没有权限浏览网页,很多,你的是啥
getting along with my roommates
I have three days before the shool starts, because I wanted to wait for my roommates, take the initiative to understand them. I know that come late, can only be a passive object. I believe my college roommates will be my helper later in life. So to them, I would be very friendly, very patient, very warm. When I really konw all of them, I found in fact they are very cute, in spite of some bad habits.
A is the first roommate i know, he studied hard, learned all the time even if after lights-out, and loved to play basketball. But he is a little superstitious, for which I also had quarrel with him. However, when I heard he also conducted a study Buddhism, I only said he was lovable. When he told me that some strange things, I learned to accept in silence, even though my heart do not agree. I think this might be the best way.
b is the most squalid of people in our dormitory, he often did not feet, hair a mess, and the morning often asleep. For him, we all try to help, after all, he was the first independent living, and we helped him carry water, wake him up.
c temper is not very good, and we try not to offend him speak. Even if he told us a few words, We have also just smiled only.But he is the favorite among us to help people.
My roommate is actually very cute, they have their own view of the world, and they understand about tolerance.This is very fortunate!
声明:本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
蜀ICP备2020033479号-4 Copyright © 2016 学习鸟. 页面生成时间:0.681秒