User Tools

Site Tools


language_definition

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
language_definition [2012/03/09 04:56] – [Comments] mhwanglanguage_definition [2012/03/17 08:56] (current) – [新语言与C/Pascal/Java的比较] marong
Line 17: Line 17:
 | 注释      || 非嵌套 | 嵌套 | 非嵌套 | 嵌套 | | 注释      || 非嵌套 | 嵌套 | 非嵌套 | 嵌套 |
  
 +
 +改进的建议(这学期不适用)
 +
 +1. 允许全局变量
 +
 +2. 函数,变量,类型有独立的名字空间
 +
 +3. 变量将强制初始化
 +
 +4. 变量可以在块中间声明
 +
 +5. 去掉break和continue
 +
 +6. 去掉逗号表达式
 +
 +---by marong
 ====== Lexical Aspects ====== ====== Lexical Aspects ======
 A //token// can be a keyword, an identifier, a integer constant, a character constant, or a string constant. A //token// can be a keyword, an identifier, a integer constant, a character constant, or a string constant.
Line 65: Line 81:
   * ''**native** **int** readInt();''   * ''**native** **int** readInt();''
   * ''**native** **char** readChar();''   * ''**native** **char** readChar();''
-  * ''**native** **string** readString();'' 
-  * ''**native** **string** readLine();'' 
   * ''**native** **int** printInt(**int** i);''   * ''**native** **int** printInt(**int** i);''
   * ''**native** **int** printChar(**char** c);''   * ''**native** **int** printChar(**char** c);''
language_definition.1331269010.txt.gz · Last modified: 2012/03/09 04:56 by mhwang

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki