亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關于 pascal中標準函數swap(x,y)pascal的解釋?

關于 pascal中標準函數swap(x,y)pascal的解釋?

鴻蒙傳說 2019-02-06 16:07:29
例求兩數的最小公倍數function lcm(a,b:integer):integer;beginif a<b then swap(a,b);lcm:=a;while lcm mod b>0 do inc(lcm,a);end;
查看完整描述

2 回答

?
侃侃爾雅

TA貢獻1801條經驗 獲得超16個贊

Exchanges high order byte with the low order byte of an integer or word.

Unit

System

Category

backward compatibility routines

Delphi syntax:

function Swap(X);

Description

In 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.

查看完整回答
反對 回復 2019-03-22
?
慕田峪7331174

TA貢獻1828條經驗 獲得超13個贊

交換a,b兩變量的值
swap(a,b)實際上就是
t:=a;//t為臨時變量
a:=b;
b:=t;

查看完整回答
反對 回復 2019-03-22
  • 2 回答
  • 0 關注
  • 1172 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號