gets






____________________________________________________________

gets − ä»ä¸ä¸ªéé读ä¸è¡

gets channelId ?varName?
____________________________________________________________




     è¿ä¸ªå½ä»¤ä» channelId
读ä¸ä¸è¡ï¼è¿åç´å°(ä½ä¸åæ¬)è¡ç»æå符çè¡ä¸ææå‐
符ï¼å¹¶æå¼è¡ç»æå符ãå¦æçç¥äº
varNameï¼æè¿ä¸è¡ä½ä¸ºå½ä»¤çç»æè¿åãå¦ææå®äº varName
ï¼åæè¿ä¸è¡æ¾ç½®å°å«è¿ä¸ªååçåéä¸èè¿åå¼æ¯è¿åçå符æ»æ°ã

     å¦æå¨æ£ç´¢è¡ç»æçæ¶åéå°äºæ件ç»æï¼å½ä»¤è¿åç´å°æ件ç»æå¯è·å¾çææè¾å¥ãå¦æ
channelIdå¨éé»å¡æ¨¡å¼ä¸å¹¶ä¸ä¸è½è·å¾å®æ´çä¸è¡çè¾å¥ï¼å½ä»¤è¿åä¸ä¸ªç©ºä¸²å¹¶ä¸æ¶èä»»ä½è¾å¥ãå 为æ件ç»ææå 为å¨éé»å¡æ¨¡å¼ä¸æ°æ®ä¸å足ï¼å¦ææå®äº
varName 并åè¿åäºä¸ä¸ªç©ºä¸²ï¼åè¿åçæ»æ°æ¯ ‐1ã注æå¦ææªæå®
varName
åå¨æ件ç»æå没æå¯è·å¾çå®æ´çä¸è¡çæåµä¸äº§ççç»æä¸è¾å¥è¡åªç±ä¸ä¸ªè¡ç»æå‐
符ç»æåæ ·ã使ç¨eof å fblockedå½ä»¤æ¥åºå«è¿ä¸ç§æåµã


file(n), eof(n), fblocked(n)


blocking, channel, end of file, end of line, line,
nonblocking, read


å¯èé士

2001/09/02

http://cmpp.linuxforum.net


æ¬é¡µé¢ä¸æçç±ä¸æ man æå页计åæä¾ã
ä¸æ man æå页计åï¼https://github.com/man‐pages‐zh/manpages‐
zh