æé»ã®åå¤æããã£ããä½è ãªãã â¦
ã¨ç°èã§è²ã£ãæããªãç´æ´ãªå¥½éå¹´ã§ããç§ãJavaScriptã®ææã®æé»ã®åå¤æã«æ¯ãã¦ããã¨ãããããã°ã©ãçéã§å®¹èµ¦ãªãä»äººã«ããµã«ãªããªãã¤ãããã¨ã§æåãªæ¹ã
ããããã©ããããããããå©è¨ãé ããã®ã§è²ã
調ã¹ã¦ã¿ããã¨ã«ãã¾ããããªãã以ä¸ã®è¨èªé¸æã«ä½ãæ£æçãªã¢ãã¯ç¡ããæ®æ®µãã使ãè¨èªã並ã¹ãã ãã§ããããããã³ããå¶ç¶ã®é¸æã ãï¼
JavaScript
1 + '1' > 11 //ãªãã»ã©ãæ°å¤ã¨æååã§è¨ç®ããã¨æååã«å¤æãããã®ã 3 * '3' > 9 //ãã£ï¼ (1+2)+'3' > '33' 1+(2+'3') > '123' //çµåæ³åã¨ã¯ä½ã ã£ãã®ã⦠1 + true > 2 //ãã°ãâ¦ã©ããã¦ãããªã£ã⦠true == 1 > true //ãµããµããã©ããã==ã§ç¢ºèªãã¦ã¿ãã¨trueã¨1ã¯åããããããã«true === 1ã¯falseã ãã© "AA" + 1 > 'AA1' "AA" + true > 'AAtrue' //'AA1'ãããªãã®ããï¼ï¼
HSP
mes 1+"1" > 2; //ã㣠mes "1"+1 > 11; //ãªãã»ã©ãæåã®é ã«åãåããã¦ãã®ããªï¼ mes 1+"1A" > 2; //ã㣠mes 1+"A1" > 1; //ãã㣠mes 1+"ï¼" > 1; //ãããã£
Excelã·ã¼ã
=1+"1" > 2; ="1"+1 > 2; ="1"+"1" > 2; //ãããããããã¸ã§ï¼ï¼ ="a1"+1 > error;
VBA
MsgBox ("1" + 1) > 2; MsgBox (1 + "1") > 2; MsgBox ("1" + "1") > "11";ããããããåããã¨ãã¦ãExcelã·ã¼ãã¨çµæãéããã ï¼ MsgBox (1 + "A1") > error;
awk*1
>awk "BEGIN{ print "1"+1; >2 print 1+"1"; >2 print "1"+"1"; >2 //awkããã£ï¼ï¼ print "1a"+1; >11 //ã㣠print "a1"+1; >1 //ã㣠print "1a"+"1"; >11 //ãã£ã"1a1"ãããªãã®â¦ print ""+"1"; >error //ãã£ããªãã§ã¨ã©ã¼ãªã®ã"1"ãããªãã®â¦ print ""+1; >error //ãã£ããªãã§ã¨ã©ã¼ãªã®ã"1"ã§ã1ã§ããªãã®â¦ print "1a"+"a"; >10 //ã㣠print "a"+"a"; >0 //ãªãã»ã©ã+ã¯æ°å¤ã«å¼·å¶å¤æããã®ããªï¼ ã print 1; >1 print 01; >1 print 10; >10 print 010; >8 //8é²æ°ã¨ãã¦å¦ç print "010"; >8 //ãã£ããã£ããã£ããã¸ã§â¦ }"
ææ³
awkã«é¢ãã追è¨*2
@houmeiãããããã®ãããªãææãé æ´ãããã¾ããã
https://twitter.com/houmei/status/292668690787336193
https://twitter.com/houmei/status/292669890911948800
ã§ãç§ã®ä¸è¨ã®çµæã¯1ã©ã¤ãã¼ã§å®è¡ãããã®ã§ããããã§houmeiããã¨åããã¹ã¯ãªããã«ãã¦å®è¡ãã¦ã¿ãã¨ããã
http://ideone.com/E7zfcS
ã¨ãããããªçµæã«ãªãã¾ããã
ãã£ãã£ãã£ãã©ããããã¨ã1ã©ã¤ãã¼ã§ã®çµæã¨ã¹ã¯ãªããå®è¡ããæã®çµæã£ã¦éãã®ï¼ãã¸ã§â¦ï¼ã¨æã£ã¦ãã
https://twitter.com/houmei/status/292672197611384835
ã¨ãããã¨ã ã£ãããã§ãã
ã¾ãã@finalfusionãããã
https://twitter.com/finalfusion/status/292679245812097024
ã¨ãããææãé ãã¾ããããã¼ããPHPã§æååã+ã§é£çµãããã¨ãã¦ãã¾ã£ã¦é¢åããããã¨ã«ãªã£ãã®ãæãåºãã¾ããã
è¨ããã¦ã¿ãã°ããããã¼ã ã£ã¦æããªã®ã§ãããç´ ã§ãã£ãããã¦å®éã®æ¥åã§ãåããã¨ãã§ããããã ãªã¨æã£ãã®ã§ãããã¦æ¥ãæãç¶ãããã¨ã«ãã¾ãã
ãææãããã¨ããããã¾ããï¼
追è¨ã®è¿½è¨
4/9ã«Pythonã¨JavaScriptã®æé»ã®åå¤æãã¿ãæãã¦é ããã®ã§è¿½å ãã¾ããã
追è¨ã®è¿½è¨ã®è¿½è¨
é¢ç½ãã®ç´¹ä»ãã¦é ããã®ã§è¿½è¨ã
JavaScriptクイズ「x + 0 == x - 0」