Warning: Trying to access array offset on value of type bool in /home/cycos/cammy.co.jp/public_html/technical/wp-content/themes/cocoon-master/lib/utils.php on line 2604

Warning: Trying to access array offset on value of type bool in /home/cycos/cammy.co.jp/public_html/technical/wp-content/themes/cocoon-master/lib/utils.php on line 2604

Warning: Trying to access array offset on value of type bool in /home/cycos/cammy.co.jp/public_html/technical/wp-content/themes/cocoon-master/lib/utils.php on line 2632

max

説明

指定した2つの値を比較し、大きいほうの値を返す関数です。

構文

書き方 答え=max(A,B)
戻り値 答え….大きいほうの値(データ型は自由)
引数 (unsigned int)マイクロ秒

プログラム例

void setup() {
  Serial.begin(115200) ;
}
// 繰り返し実行される処理
void loop(){
double A=120.151;
long B=1000;
double ans = max(A,B) ;
Serial.println(ans) ;
}

注意


      
タイトルとURLをコピーしました