基本介紹
- 中文名:保留關鍵字
- 外文名:reserved word
- 套用領域:資料庫,程式語言等
- 特點:不能作為變數名或過程名
- 涉及語言:C語言、JavaScript等
- 語言間的區別:數量,定義規則均有區別
介紹
C語言
- 類型說明保留字:int,long,short,float,double,char,unsigned,signed,const,void,volatile,enum,struct,union
- 語句定義保留字:if,else,goto,switch,case,do,while,for,continue,break,return,default,typedef
- 存儲類說明保留字:auto,register,extern,static
- 長度運算符保留字:sizeof
auto | 指定變數的存儲類型,是默認值 |
break | 跳出循環或switch語句 |
case | 定義switch中的case子句 |
char | 定義字元型變數或指針 |
const | 定義常量或參數 |
continue | 在循環語句中,回到循環體的開始處重新執行循環 |
default | 定義switch中的default子句 |
do | 定義do-while語句 |
double | 定義雙精度浮點數變數 |
else | 定義枚舉類型 |
enum | 聲明外部變數或函式 |
extern | 聲明外部變數或函式 |
float | 定義浮點型變數或指針 |
for | 定義for語句 |
goto | 定義goto語句 |
if | 定義if語句或if-else語句 |
int | 定義整型變數或指針 |
long | 定義長整型變數或指針 |
register | 指定變數的存儲類型是暫存器變數,Turbo c中用自動變數代替 |
return | 從函式返回 |
short | 定義短整型變數或指針 |
signed | 定義有符號的整型變數或指針 |
sizeof | 獲取某種類型的變數或數據所占記憶體的大小,是運算符 |
static | 指定變數的存儲類型是靜態變數,或指定函式是靜態函式 |
struct | 定義結構體類型 |
switch | 定義switch語句 |
typedef | 為數據類型定義別名 |
union | 定義無符號的整型或字元型變數或指針 |
unsigned | 定義無符號的整型變數或數據 |
void | 定義空類型變數或空類型指針,或指定函式沒有返回值 |
volatile | 變數的值可能在程式的外部被改變 |
while | 定義while或do-while語句 |
JavaScript
abstract | arguments | boolean | break | byte |
case | catch | char | class* | const |
continue | debugger | default | delete | do |
double | else | enum* | eval | export* |
extends* | false | final | finally | float |
for | function | goto | if | implements |
import* | in | instanceof | int | interface |
let | long | native | new | null |
package | private | protected | public | return |
short | static | super* | switch | synchronized |
this | throw | throws | transient | true |
try | typeof | var | void | volatile |
while | with | yield |
Array | Date | eval | function | hasOwnProperty |
Infinity | isFinite | isNaN | isPrototypeOf | length |
Math | NaN | name | Number | Object |
prototype | String | toString | undefined | valueOf |
getClass | java | JavaArray | javaClass | JavaObject | JavaPackage |
Windows
alert | all | anchor | anchors | area |
assign | blur | button | checkbox | clearInterval |
clearTimeout | clientInformation | close | closed | confirm |
constructor | crypto | decodeURI | decodeURIComponent | defaultStatus |
document | element | elements | embed | embeds |
encodeURI | encodeURIComponent | escape | event | fileUpload |
focus | form | forms | frame | innerHeight |
innerWidth | layer | layers | link | location |
mimeTypes | navigate | navigator | frames | frameRate |
hidden | history | image | images | offscreenBuffering |
open | opener | option | outerHeight | outerWidth |
packages | pageXOffset | pageYOffset | parent | parseFloat |
parseInt | password | pkcs11 | plugin | prompt |
propertyIsEnum | radio | reset | screenX | screenY |
scroll | secure | select | self | setInterval |
setTimeout | status | submit | taint | text |
textarea | top | unescape | untaint | window |
HTML
onblur | onclick | onerror | onfocus |
onkeydown | onkeypress | onkeyup | onmouseover |
onload | onmouseup | onmousedown | onsubmit |
SQL Server
ADD | EXCEPT | PERCENT |
ALL | EXEC | PLAN |
ALTER | EXECUTE | PRECISION |
AND | EXISTS | PRIMARY |
ANY | EXIT | PRINT |
AS | FETCH | PROC |
ASC | FILE | PROCEDURE |
AUTHORIZATION | FILLFACTOR | PUBLIC |
BACKUP | FOR | RAISERROR |
BEGIN | FOREIGN | READ |
BETWEEN | FREETEXT | READTEXT |
BREAK | FREETEXTTABLE | RECONFIGURE |
BROWSE | FROM | REFERENCES |
BULK | FULL | REPLICATION |
BY | FUNCTION | RESTORE |
CASCADE | GOTO | RESTRICT |
CASE | GRANT | RETURN |
CHECK | GROUP | REVOKE |
CHECKPOINT | HAVING | RIGHT |
CLOSE | HOLDLOCK | ROLLBACK |
CLUSTERED | IDENTITY | ROWCOUNT |
COALESCE | IDENTITY_INSERT | ROWGUIDCOL |
COLLATE | IDENTITYCOL | RULE |
COLUMN | IF | SAVE |
COMMIT | IN | SCHEMA |
COMPUTE | INDEX | SELECT |
CONSTRAINT | INNER | SESSION_USER |
CONTAINS | INSERT | SET |
CONTAINSTABLE | INTERSECT | SETUSER |
CONTINUE | INTO | SHUTDOWN |
CONVERT | IS | SOME |
CREATE | JOIN | STATISTICS |
CROSS | KEY | SYSTEM_USER |
CURRENT | KILL | TABLE |
CURRENT_DATE | LEFT | TEXTSIZE |
CURRENT_TIME | LIKE | THEN |
CURRENT_TIMESTAMP | LINENO | TO |
CURRENT_USER | LOAD | TOP |
CURSOR | NATIONAL | TRAN |
DATABASE | NOCHECK | TRANSACTION |
DBCC | NONCLUSTERED | TRIGGER |
DEALLOCATE | NOT | TRUNCATE |
DECLARE | NULL | TSEQUAL |
DEFAULT | NULLIF | UNION |
DELETE | OF | UNIQUE |
DENY | OFF | UPDATE |
DESC | OFFSETS | UPDATETEXT |
DISK | ON | USE |
DISTINCT | OPEN | USER |
DISTRIBUTED | OPENDATASOURCE | VALUES |
DOUBLE | OPENQUERY | VARYING |
DROP | OPENROWSET | VIEW |
DUMMY | OPENXML | WAITFOR |
DUMP | OPTION | WHEN |
ELSE | OR | WHERE |
END | ORDER | WHILE |
ERRLVL | OUTER | WITH |
ESCAPE | OVER | WRITETEXT |
ODBC
ABSOLUTE | EXEC | OVERLAPS |
ACTION | EXECUTE | PAD |
ADA | EXISTS | PARTIAL |
ADD | EXTERNAL | PASCAL |
ALL | EXTRACT | POSITION |
ALLOCATE | FALSE | PRECISION |
ALTER | FETCH | PREPARE |
AND | FIRST | PRESERVE |
ANY | FLOAT | PRIMARY |
ARE | FOR | PRIOR |
AS | FOREIGN | PRIVILEGES |
ASC | FORTRAN | PROCEDURE |
ASSERTION | FOUND | PUBLIC |
AT | FROM | READ |
AUTHORIZATION | FULL | REAL |
AVG | GET | REFERENCES |
BEGIN | GLOBAL | RELATIVE |
BETWEEN | GO | RESTRICT |
BIT | GOTO | REVOKE |
BIT_LENGTH | GRANT | RIGHT |
BOTH | GROUP | ROLLBACK |
BY | HAVING | ROWS |
CASCADE | HOUR | SCHEMA |
CASCADED | IDENTITY | SCROLL |
CASE | IMMEDIATE | SECOND |
CAST | IN | SECTION |
CATALOG | INCLUDE | SELECT |
CHAR | INDEX | SESSION |
CHAR_LENGTH | INDICATOR | SESSION_USER |
CHARACTER | INITIALLY | SET |
CHARACTER_LENGTH | INNER | SIZE |
CHECK | INPUT | SMALLINT |
CLOSE | INSENSITIVE | SOME |
COALESCE | INSERT | SPACE |
COLLATE | INT | SQL |
COLLATION | INTEGER | SQLCA |
COLUMN | INTERSECT | SQLCODE |
COMMIT | INTERVAL | SQLERROR |
CONNECT | INTO | SQLSTATE |
CONNECTION | IS | SQLWARNING |
CONSTRAINT | ISOLATION | SUBSTRING |
CONSTRAINTS | JOIN | SUM |
CONTINUE | KEY | SYSTEM_USER |
CONVERT | LANGUAGE | TABLE |
CORRESPONDING | LAST | TEMPORARY |
COUNT | LEADING | THEN |
CREATE | LEFT | TIME |
CROSS | LEVEL | TIMESTAMP |
CURRENT | LIKE | TIMEZONE_HOUR |
CURRENT_DATE | LOCAL | TIMEZONE_MINUTE |
CURRENT_TIME | LOWER | TO |
CURRENT_TIMESTAMP | MATCH | TRAILING |
CURRENT_USER | MAX | TRANSACTION |
CURSOR | MIN | TRANSLATE |
DATE | MINUTE | TRANSLATION |
DAY | MODULE | TRIM |
DEALLOCATE | MONTH | TRUE |
DEC | NAMES | UNION |
DECIMAL | NATIONAL | UNIQUE |
DECLARE | NATURAL | UNKNOWN |
DEFAULT | NCHAR | UPDATE |
DEFERRABLE | NEXT | UPPER |
DEFERRED | NO | USAGE |
DELETE | NONE | USER |
DESC | NOT | USING |
DESCRIBE | NULL | VALUE |
DESCRIPTOR | NULLIF | VALUES |
DIAGNOSTICS | NUMERIC | VARCHAR |
DISCONNECT | OCTET_LENGTH | VARYING |
DISTINCT | OF | VIEW |
DOMAIN | ON | WHEN |
DOUBLE | ONLY | WHENEVER |
DROP | OPEN | WHERE |
ELSE | OPTION | WITH |
END | OR | WORK |
END-EXEC | ORDER | WRITE |
ESCAPE | OUTER | YEAR |
EXCEPT | OUTPUT | ZONE |
EXCEPTION |
將來的關鍵字
ABSOLUTE | FOUND | PRESERVE |
ACTION | FREE | PRIOR |
ADMIN | GENERAL | PRIVILEGES |
AFTER | GET | READS |
AGGREGATE | GLOBAL | REAL |
ALIAS | GO | RECURSIVE |
ALLOCATE | GROUPING | REF |
ARE | HOST | REFERENCING |
ARRAY | HOUR | RELATIVE |
ASSERTION | IGNORE | RESULT |
AT | IMMEDIATE | RETURNS |
BEFORE | INDICATOR | ROLE |
BINARY | INITIALIZE | ROLLUP |
BIT | INITIALLY | ROUTINE |
BLOB | INOUT | ROW |
BOOLEAN | INPUT | ROWS |
BOTH | INT | SAVEPOINT |
BREADTH | INTEGER | SCROLL |
CALL | INTERVAL | SCOPE |
CASCADED | ISOLATION | SEARCH |
CAST | ITERATE | SECOND |
CATALOG | LANGUAGE | SECTION |
CHAR | LARGE | SEQUENCE |
CHARACTER | LAST | SESSION |
CLASS | LATERAL | SETS |
CLOB | LEADING | SIZE |
COLLATION | LESS | SMALLINT |
COMPLETION | LEVEL | SPACE |
CONNECT | LIMIT | SPECIFIC |
CONNECTION | LOCAL | SPECIFICTYPE |
CONSTRAINTS | LOCALTIME | SQL |
CONSTRUCTOR | LOCALTIMESTAMP | SQLEXCEPTION |
CORRESPONDING | LOCATOR | SQLSTATE |
CUBE | MAP | SQLWARNING |
CURRENT_PATH | MATCH | START |
CURRENT_ROLE | MINUTE | STATE |
CYCLE | MODIFIES | STATEMENT |
DATA | MODIFY | STATIC |
DATE | MODULE | STRUCTURE |
DAY | MONTH | TEMPORARY |
DEC | NAMES | TERMINATE |
DECIMAL | NATURAL | THAN |
DEFERRABLE | NCHAR | TIME |
DEFERRED | NCLOB | TIMESTAMP |
DEPTH | NEW | TIMEZONE_HOUR |
DEREF | NEXT | TIMEZONE_MINUTE |
DESCRIBE | NO | TRAILING |
DESCRIPTOR | NONE | TRANSLATION |
DESTROY | NUMERIC | TREAT |
DESTRUCTOR | OBJECT | TRUE |
DETERMINISTIC | OLD | UNDER |
DICTIONARY | ONLY | UNKNOWN |
DIAGNOSTICS | OPERATION | UNNEST |
DISCONNECT | ORDINALITY | USAGE |
DOMAIN | OUT | USING |
DYNAMIC | OUTPUT | VALUE |
EACH | PAD | VARCHAR |
END-EXEC | PARAMETER | VARIABLE |
EQUALS | PARAMETERS | WHENEVER |
EVERY | PARTIAL | WITHOUT |
EXCEPTION | PATH | WORK |
EXTERNAL | POSTFIX | WRITE |
FLASE | PREFIX | YEAR |
FIRST | PREORDER | ZONE |
FLOAT | PREPARE |