搞不懂楼主如何在不看帮助的条件下学习语言的??<br />下面摘抄了语法说明,显然,在括号内只有一个数时,该数加一,<br />在有两个数时,增加数为后边的数而不为一,这种用法多数用在<br />有指针的时候。<br /><br />Delphi syntax:<br /><br />procedure Inc(var X [ ; N: Longint ] );<br /><br />Description<br /><br />In Delphi code, Inc adds one or N to the variable X.<br /><br />X is a variable of an ordinal type (including Int64), or a pointer type if the extended syntax is enabled.<br /><br />N is an integer-type expression. <br /><br />X increments by 1, or by N if N is specified; that is, Inc(X) corresponds to the statement X := X + 1, and Inc(X, N) corresponds to the statement X := X + N. However, Inc generates optimized code and is especially useful in tight loops.<br /><br />Note: If X is a pointer type, it increments X by N times the size of the type pointed to. Thus, given
|