Detect months with 31 days

前端 未结 19 1600
南旧
南旧 2020-12-18 01:53

Is there an analogous form of the following code:

if(month == 4,6,9,11)
{
  do something;
}

Or must it be:

if(month == 4 ||         


        
19条回答
  •  离开以前
    2020-12-18 02:24

    In Icon, you can do

    if month = (4|6|9|11) then ...
    

    You can also do

    if a < b < c then ...
    

    See also

    • Wikipedia: Icon (programming language)

提交回复
热议问题