function lcm(a,b:integer):integer; begin if a<b then swap(a,b); lcm:=a; while lcm mod b>0 do inc(lcm,a); end;
鸿蒙传说
浏览 1143回答 2
2回答
侃侃尔雅
Exchanges high order byte with the low order byte of an integer or word.UnitSystemCategorybackward compatibility routinesDelphi syntax:function Swap(X);DescriptionIn Delphi code, Swap exchanges the high-order bytes with the low-order bytes of the argument. X is an expression of type SmallInt, as a 16-bit value, or Word. This is provided for backward compatibility only.