ffilesize:integer;
fdata:pbyte;
pdata:pchar;...................pdata:=pchar(fdata);
inc(pdata,ffilesize);
pdata^:=#0;if ucase then
   strupper(pchar(fdata))
else
   strlower(pchar(fdata));在这段代码中inc(pdata,ffilesize); 是什么意思?起什么作用?
inc()函数的使用能给我具体解释一下吗?

解决方案 »

  1.   

    UnitSystemCategoryordinal routinesDelphi syntax:procedure Inc(var X [ ; N: Longint ] );DescriptionIn Delphi code, Inc adds one or N to the variable X.X is a variable of an ordinal type (including Int64), or a pointer type if the extended syntax is enabled.N is an integer-type expression. 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.Note: If X is a pointer type, it increments X by N times the size of the type pointed to. Thus, giventype  PMytype = ^TMyType;andvar  P: PMyType;the statementInc(P);increments P by SizeOf(TMyType).Warning: You can抰 use Inc on properties because it modifies the parameter.Note: Inc(S, I) where S is a ShortInt and I is a number greater than 127 will cause an EIntOverFlow exception to be raised if range and overflow checking are on. In Delphi 1.0, this did not raise an exception.
      

  2.   

    procedure Inc(var X [ ; N: Longint ] );
    自增1或N(N有值时)