ããã°ã©ã 解æå ¥é ãããã¯C/C++ãå®å ¨ã«æ¸ãã®ãé£ãããã話 Last updated: Jul 30, 2022 Kinuko Yasuda <@kinu>
ã¯ããã« æ¬è¨äºã¯é»åæ¸ç±çãããã¾ãã linuxã«ã¼ãã«ã¯Cè¨èªã®ãã¯ããé§ä½¿ãã¦æ¸ããã¦ãã¾ãããããã®ãã¡ãåã£ããã¯ãã«ãªãã¿ã®ç¡ã人ã«ã¯åè¦ã§ã¯æå³ãããããªã&ããã£ã¦ã¿ãã°é¢ç½ãã§ããããã®ãããã¤ãç´¹ä»ãããã¾ãã対象èªè ã¯ãCè¨èªã®ã¦ã¼ã¶ã ããã©ãããã¯ãã¯å®æ°å®ç¾©ãããã«ãã使ããªãã¨ããã©ã¤ããªãã¯ãã¦ã¼ã¶ã§ãã ãã¯ãã使ç¨ããå ´æã«ä¾åããã¨ã©ã¼ãé²ã 次ã®ãã¯ãã¯ãäºã¤ã®å¼ãæ°ã®å¤ãç½®æããã ãã®åç´ãªãã®ã§ãã #define swap(a, b) \ do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) 注ç®ãã¹ãã¯ãã¯ãã®å®ç¾©å ¨ä½ãå²ãã§ããdo { ... } while (0)ã¨ãã表è¨ã§ããåè¦ã®äººã«ã¯ä½ã®ãã¨ãããããªãã¨æãã¾ããèããããæãåç´ãªå®ç¾©ããé¡ã£ã¦ããªãã
2010å¹´05æ13æ¥04:00 ã«ãã´ãªLightweight Languages (gc)c - block?ããã£ã¦nested functionã§åºæ¥ãã! æ®å¿µãªããBlocksã使ããã®ã¯OS Xã®ã¿ã§ããã⦠Binary Hacks é«æå² / éµé£¼ææ / ä½è¤ç¥ä» / æµå°æ ä¸é / é¦è¤ä¸å¹¸ Perlã¨ã³ã¸ãã¢ã®ããã®Objective-C Blockså ¥é - unknownplace.orgOS X 10.6 以éã® xcode ã§ã¯ Objective-C ã« Blocks ã¨ããã·ã³ã¿ãã¯ã¹ã追å ããã¦ããã gccã§ããã°ãNested Functions ã¨ãããã®ã使ããã ä¾ãã°ã以ä¸ã¯codepadã§ãåãã http://codepad.org/V3uDduYT #include <stdio.h> int main(int argc, char*
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}