ãªããä¸è¨ã¯ãã¹ã¦å¾ãã«=ãä»ãããã¨ã§è¨ç®ã¨ä»£å ¥ãåæã«è¡ããã¨ãã§ãã¾ãã var a = 3 a += 2 fmt.Println(a) // 5 a <<= 3 fmt.Println(a) // 40 åé æ¼ç®å æ¼ç®å 説æ 使ç¨ä¾
ãªããä¸è¨ã¯ãã¹ã¦å¾ãã«=ãä»ãããã¨ã§è¨ç®ã¨ä»£å ¥ãåæã«è¡ããã¨ãã§ãã¾ãã var a = 3 a += 2 fmt.Println(a) // 5 a <<= 3 fmt.Println(a) // 40 åé æ¼ç®å æ¼ç®å 説æ 使ç¨ä¾
console.log(+[]); // 0 console.log(+[3]); // 3 console.log(+[null]); // 0 console.log(+[undefined]); // 0 console.log(+["3"]); // 3 console.log(+[1,2]); // NaN console.log(+[true]); // NaN console.log(+[false]); // NaN ãªããã®ãããªå¦çã«ãªãã®ããJavaScriptã®ä»æ§æ¸ï¼ECMA Script Specification 5thï¼ãã説æãã¦ã¿ã¾ãããã ã¾ãæåãåé +æ¼ç®åï¼Unary + Operatorï¼ãè©ä¾¡ããéã«ãToNumberãå¼ã³åºãã®ã¯åè¿°ããã¨ããã§ããä»æ§æ¸ã®ï¼11.4.6ï¼ã«æ¸ããã¦ãã¾ããã§ã¯ToNumberã¨ã¯ã©ã®ãããªå¦çã§ããããã
æ¯è¼æ¼ç®ã®çµæã¯ã1 (TRUE)ã0 (FALSE)ãã¾ã㯠NULL ã®å¤ã«ãªãã¾ãã ãããã®æ¼ç®ã¯ãæ°åã¨æååã®ä¸¡æ¹ã§æ©è½ãã¾ãã å¿ è¦ã«å¿ãã¦ãæååã¯æ°åã«ãæ°åã¯æååã«èªåçã«å¤æããã¾ãã 次ã®é¢ä¿æ¯è¼æ¼ç®åã使ç¨ããã°ãã¹ã«ã©ã¼ãªãã©ã³ãã ãã§ãªãè¡ãªãã©ã³ããæ¯è¼ã§ãã¾ãã = > < >= <= <> != ãããã®æ¼ç®åã®è©³ç´°ã¯ããã®ã»ã¯ã·ã§ã³ã®å¾åã§èª¬æãã¾ãã è¡ãµãã¯ã¨ãªã¼ã®ã³ã³ããã¹ãã«ãããè¡æ¯è¼ã®ãã®ä»ã®ä¾ã¯ãã»ã¯ã·ã§ã³13.2.11.5ãè¡ãµãã¯ã¨ãªã¼ã ãåç §ãã¦ãã ããã ãã®ã»ã¯ã·ã§ã³ã§ç¤ºãé¢æ°ã®ä¸é¨ã§ã¯ã1 (TRUE)ã0 (FALSE)ãã¾ã㯠NULL 以å¤ã®å¤ãè¿ããã¾ãã LEAST() ããã³ GREATEST() ã¯ãã®ãããªé¢æ°ã®ä¾ã§ããã»ã¯ã·ã§ã³12.3ãå¼è©ä¾¡ã§ã®åå¤æã ã§ã¯ããããã®é¢æ°ã¨åæ§ã®é¢æ°ã«ãã£ã¦å®è¡ããã
Perlã®é£ããªãäºæ ãã ãã£ã¨ãããã§ããPerlã«ã¯æ¼ç®åãå¤ãããã®ã§ããããã£ããã®æ©ä¼ãªã®ã§ãPerlã®æ¼ç®åãç´¹ä»ãã¾ãã ãã¼ãã¹æ¼ç®å: 0+, +0 æ°å¤ã¨ãã¦è©ä¾¡ãã¦ããã¾ããæå¤ã¨ããè¦ããã¾ããã ãªããã®æ¼ç®åã使ãå¿ è¦ãããã®ãã¨ããã¨ãPerlã¯æååã¨æ°å¤ãæ確ã«åºå¥ã§ããªãããã§ããscalarãæååã¨ãã¦è§£éãããªãã°æååã¨ãã¦ã print 0+ '10'; #=> 10 print 0+ '123b'; #=> 123 print '1.2e3' +0; #=> 1200 print [] +0; #=> 4303367864 ã¡ãªã¿ã«ãæååã¨ãã¦è©ä¾¡ããã¨ãã«ã¯ãã®ããã«ããã¨ãã£ãããã¨è¨ããã¦ãã¾ãã $obj.q(); ä¸è¦ã¡ã½ããå¼ã³åºãã®ããã«è¦ãã¾ãã $obj . ''; ã¨ç価ã§ãã ããã¼ã«ã¼æ¼ç®å: @{[ ]} æå
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}