看看DELPHI6开发者手册吧,那上面有

解决方案 »

  1.   

    Round:四舍五入.
    Trunc:截断取整.
      

  2.   

    我也是新轉行學D5,雖說寫系統也有幾個來月,但你說的問題在D5中一直未留
    意,一般我都是在SQL2000中解決的。下面的代碼可以達到你要求的功能,就
    是繁了一些。var Int_Value:integer;
        J_RealValue:Real;
    begin
       J_RealValue := 123.4332;
       Int_Value := strtoint(Floattostr(int(J_RealValue)));
    end;
      

  3.   

    54 div 3 整除 The following kinds of casts are allowed: - Ordinal or pointer type to another ordinal or pointer type - A character, string, array of character or pchar to a string - An ordinal, real, string or variant to a variant - A variant to an ordinal, real, string or variant - A variable reference to any type of the same size. Note that casting real types to integer can be performed with the standard functions Trunc and Round.There are other transfer functions like Ord and Chr that might make your intention clearer. program Produce;begin
      Writeln( Integer(Pi) );
    end.This programmer thought he could cast a floating point constant to Integer, like in C. program Solve;begin
      Writeln( Trunc(Pi) );
    end.In Pascal, we have separate Transfer functions to convert floating point values to integer.
      

  4.   

    DELPHI中整数除法用 DIV , 10 DIV 3 = 3
    浮点数用 /
      

  5.   

    楼上说的对,建议你看看《delphi5 开发人员指南》的前几章,你会bcb,用delphi应该很快就可以上手。
      

  6.   

    谢谢各位,特别谢谢pazee(耙子)
      

  7.   

    Round,Trunc等函数都可以的,随你了!
    ================================================================
    一颗红心向前看,为了革命两茫然,不好意思才囊尽,只能说上一点点。
    ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
    ★                                                            ★
    ★                                                            ★
    ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
    ================================================================
      

  8.   

    嘻嘻,嘻嘻,晚了哦,捧场捧场啦~!
    round哦