AppleScript名:奇数かどうかチェック |
set a to 5 set aRes to chkOddNum(a) of me –> true set b to 8 set bRes to chkEvenNum(b) of me –> true –奇数かどうかチェック on chkOddNum(aNum) set a to aNum mod 2 if a = 1 then return true else return false end if end chkOddNum –偶数かどうかチェック on chkEvenNum(aNum) set a to aNum mod 2 if a = 0 then return true else return false end if end chkEvenNum |
More from my site
(Visited 186 times, 1 visits today)