| Term :: Transkeys. Ư¼ö Å°¿¡ ÀÀ´äÇÏ´Â µ¿¾È ÀÔ·ÂÀ» Àд ¹æ¹ý |
Áö±Ý ´Ù¿î·Îµå |
Term :: Transkeys. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~exodist/
Term :: Transkeys. ű×
Term :: Transkeys. ¼³¸í
Ư¼ö Å°¿¡ ÀÀ´äÇÏ´Â µ¿¾È ÀÔ·ÂÀ» Àд ¹æ¹ý Term :: Transkeys´Â Ưº°ÇÑ Å°¿¡ ÀÀ´äÇÏ´Â µ¿¾È ÅؽºÆ® ÀÔ·ÂÀ» Àд ¹æ¹ýÀ» Á¦°øÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù .Snopsis »ç¿ë ±â°£ :: Transkeys; ³» $ listener = term :: transkeys-> new (action => { '=> sub {... f1 Å°¸¦ ´©¸¦ ¶§ ¹º°¡ ¼öÇà)}); # Term :: ȸéÀº ¿¹Á¦¿¡¼ »ç¿ë µÈ ¿ä±¸ »çÇ×ÀÌ ¾Æ´Õ´Ï´Ù. ¿ë¾î :: ȸé; ³» $ scr = »õ·Î¿î ¿ë¾î :: ȸé; $ scr-> clrscr; µ¿¾È (1) {#tion ³» $ lineÀÇ ÀÔ·Â ¶óÀÎÀ» À¯ÁöÇÒ ¼ö ÀÖ½À´Ï´Ù. # 0.01 °£°ÝÀ¸·Î ÀÔ·Â, ºñ Â÷´Ü IO, ·çÇÁÀÇ ¿ÏÀüÇÑ ¶óÀÎÀ» °¡Áú ¶§±îÁö ¹öÆÛ¸¦ ÀμâÇϽʽÿÀ. while (Á¤ÀǵÇÁö ¾ÊÀ½ ($ line = $ listener-> ActionRead (mode => 0.01))) {# ÇÁ·ÒÇÁÆ® ³» $ prompt = "ÀÔ·Â"; "; # ¹öÆÛ¿¡¼ ÇöÀç À§Ä¡ (¿À¸¥ÂÊ¿¡¼)¸¦ ÀμâÇϽʽÿÀ. $ scr-> at (15, 0) -> clreol-> puts ($ listener-> bufferposition); # Áö±Ý±îÁö ÀÔ·Â µÈ ÅؽºÆ®»Ó¸¸ ¾Æ´Ï¶ó ÇÁ·ÒÇÁÆ®¸¦ Ç¥½ÃÇϽʽÿÀ. $ scr-> at (10,0) -> clreol-> puts ( "ÀÔ·Â :". $ listener-> bufferString); # Ä¿¼¸¦ ÅؽºÆ® ÅؽºÆ®ÀÇ TRUR À§Ä¡·Î À̵¿ $ scr-> at (10, $ listener-> bufferPosition + ±æÀÌ ($ ÇÁ·ÒÇÁÆ®)); } # »õ ¿Ï¼º µÈ ÁÙÀ» °¡Áú ¶§ : # * È¸é »ó´ÜÀÇ ¼±À» »èÁ¦ÇÏ°í ´Ù¸¥ ÁÙÀ» ¿òÁ÷ÀÔ´Ï´Ù. # * Çà 9¿¡¼ »õ ÁÙÀ» Ãâ·ÂÇÕ´Ï´Ù. Chomp ($ line); $ scr-> at (0,0) -> DL; $ scr-> at (9,0) -> clreol-> puts ($ line); $ LINE EQ 'EXIT'ÀÎ °æ¿ì Ãⱸ (0); } ¿ä±¸ »çÇ× : ¡¤ Perl.
Term :: Transkeys. °ü·Ã ¼ÒÇÁÆ®¿þ¾î