Go to the first, previous, next, last section, table of contents.


¹®¹ý

À̹øÀå¿¡¼­´Â ƯÁ¤ÇÑ ±â°è¿¡ ÀÇÁ¸ÇÏÁö ¾Ê´Â ¹®¹ýÀ» ¼³¸íÇÑ´Ù. as ÀÇ ¹®¹ýÀº ¸¹Àº ´Ù¸¥ ¾î¼Àºí·¯µéÀÇ ¹®¹ý°ú ºñ½ÁÇÏ´Ù. as´Â Vax ÀÇ ºñÆ®Çʵ带 ¾î¼Àºí ÇÏÁö ¸øÇÏ´Â °Í¸¸ Á¦¿ÜÇϸé, BSD 4.2 assembler, except that as does not assemble Vax bit-fields.

Àüó¸®

Àü󸮱â´Â ´ÙÀ½°ú °°Àº ÀÛ¾÷À» ÇÑ´Ù.

It does not do macro processing, include file handling, or anything else you may get from your C compiler's preprocessor. You can do include file processing with the .include directive (see section .include "file"). You can use the GNU C compiler driver to get other "CPP" style preprocessing, by giving the input file a `.S' suffix. See section `Options Controlling the Kind of Output' in Using GNU CC.

°ø¹é¹®ÀÚµé°ú, ÁÖ¼®, ¹®ÀÚ »ó¼öµéÀÇ Áö³ªÄ£ »ç¿ëÀº ÀüÄ¡¸® µÇÁö ¾ÊÀº ÀÔ·Â ÆÄ ÀÏÀÇ ÀϺημ­ »ç¿ëµÉ ¼ö ¾ø´Ù.

¸¸ÀÏ ÀÔ·ÂÆÄÀÏÀÇ Ã¹ÁÙÀÌ #NO_APP À̰ųª `-f'¿É¼ÇÀ¸·Î ¾î¼ÀºíÀ» ½ÃµµÇÏ¿´´Ù ¸é ±× ÀÔ·ÂÆÄÀÏÀº Àüó¸® µÇÁö ¾ÊÀ» °ÍÀÌ´Ù. ÀÌ·¯ÇÑ ÀÔ·ÂÆÄÀÏ¿¡¼­, ÆÄÀÏÀÇ ÀÏ ºÎºÐÀº Àü󸮵Ǿî¾ß ÇÏ´Â ÅؽºÆ® ÀÌÀü¿¡ #APP ¿¡ ÇØ´çÇÏ´Â ¶óÀÎÀ» ³õÀ½À¸·Î½á Àüó¸® µÉ ¼ö ÀÖÀ¸¸ç, ±× ´ÙÀ½¿¡ #NO_APP ¶óÀÎÀ» ³õ´Â´Ù. ÀÌ·¯ÇÑ Æ¯Â¡Àº ÄÄÆÄÀÏ ·¯¿¡¼­ÀÇ asm ±¸¹®À» Á¦°øÇÒ ¸ñÀûÀ¸·Î ÀÛ¼ºµÇ¾úÀ¸¸ç ÄÄÆÄÀÏ·¯ÀÇ Ãâ·ÂÀº º¸Åë Àü ó¸® µÉ ÇÊ¿ä°¡ ¾ø´Ù.

Whitespace

È­ÀÌÆ® °ø¹é¹®ÀÚ(whitespace)´Â ÇϳªÀÌ»óÀÇ ºóÄ­À̰ųª ÅǵîÀÌ µÉ ¼ö ÀÖ´Ù. È­ÀÌÆ® ¹®ÀÚ´Â ½Éº¼µéÀ» ºÐ¸®ÇÏ´Â µ¥ »ç¿ëµÇ¸ç »ç¶÷µéÀÌ ÇÁ·Î±×·¥À» ½±°Ô ÀÐÀ» ¼ö ÀÖµµ·Ï ¸¸µç´Ù. ¹®ÀÚ »ó¼ö°¡ ¾Æ´Ï¶ó¸é(see section ¹®ÀÚ »ó¼öµé), ¾î¶°ÇÑ È­ÀÌÆ®¹®ÀÚµµ ¸í¹éÈ÷ ÇϳªÀÇ °ø¹é¹®ÀÚ·Î Ãë±ÞµÈ´Ù.

ÁÖ¼®

ÁÖ¼®À» as¿¡°Ô ¹ø¿ªÇÏ´Â ¹æ¹ýÀº 2°¡Áö°¡ ÀÖ´Ù. ¾çÂÊ´Ù ÁÖ¼®Àº ÇϳªÀÇ °ø¹é¹® ÀÚ¿Í µ¿ÀÏÇÑ´Ù.

`/*'¿¡¼­ ±× ´ÙÀ½ÀÇ `*/'±îÁö´Â ÁÖ¼®ÀÌ´Ù.

/*
  The only way to include a newline ('\n') in a comment
  is to use this sort of comment.
*/

/* This sort of comment does not nest. */

ÁÙ´ÜÀ§ ÁÖ¼®À» ½ÃÀÛÇÏ¸é ±× ´ÙÀ½ ´º¶óÀÎÀº ÁÖ¼®ÀÇ ÀϺηΠµÇ°í, ¿ª½Ã ¹«½ÃµÈ´Ù. The line comment character is `;' for the AMD 29K family; `;' for the H8/300 family; `!' for the H8/500 family; `;' for the HPPA; `#' on the i960; `!' for the Hitachi SH; `!' on the SPARC; `|' on the 680x0; `#' on the Vax; `!' for the Z8000; see section ±â°è¿¡ ÀÇÁ¸ÇÏ´Â °Íµé.

¾î¶² ±â°è¿¡´Â µÎ°¡ÁöÀÇ ´Ù¸¥ ÁÙ´ÜÀ§ ÁÖ¼®¿¡ »ç¿ëµÇ´Â ¹®ÀÚ°¡ ÀÖ´Ù. Çϳª´Â ¶ó Àο¡¼­ ù¹ø°·Î È­ÀÌÆ®¹®ÀÚ°¡ ¾Æ´Ñ °ÍÀ» ÁÖ¼®ÀÇ ½ÃÀÛÀ¸·Î ÇÏ´Â °ÍÀÌ°í, ´Ù¸¥ °Í Àº Ç×»ó ÇØ´çÇÏ´Â ¹®ÀÚ´Â ÁÖ¼®ÀÇ ½ÃÀÛÀ¸·Î °£ÁÖÇÏ´Â °ÍÀÌ ÀÖ´Ù.

°ú°ÅÀÇ ¾î¼Àºí·¯µé°ú ȣȯ¼ºÀ» À¯ÁöÇÏ·Á¸é `#'À¸·Î ½ÃÀÛÇÏ´Â ¶óÀο¡ ´ëÇØ Æ¯º° È÷ Çؼ®µÇ¾î¾ß ÇÑ´Ù. `#'´ÙÀ½¿¡´Â Àý´ëÀûÀΠǥÇö(see section Ç¥Çö)ÀÌ ±â´ëµÈ´Ù. ÀÌ°ÍÀº ´ÙÀ½ ¶óÀÎÀÇ ³í¸®ÀûÀÎ ÁÙ¹øÈ£ Á¤µµ°¡ µÉ °ÍÀÌ´Ù. Then a string (see section ¹®ÀÚ¿­) is allowed: if present it is a new logical file name. The rest of the line, if any, should be whitespace.

¸¸ÀÏ ¶óÀλ󿡼­ ù¹ø° ºñÈ­ÀÌÆ® ¹®ÀÚ°¡ ¼ýÀÚ°¡ ¾Æ´Ï¶ó¸é ±× ¶óÀÎÀº ¹«½ÃµÈ´Ù. (ÁÖ¼®Ã³·³.)

                          # This is an ordinary comment.
# 42-6 "new_file_name"    # New logical file name
                          # This is logical line # 36.

ÀÌ·¯ÇÑ Æ¯Â¡µéÀ» ¹Ý´ëÇÏ´Â »ç¶÷ÀÌ ¸¹Àº µ¥, ¹Ì·¡ÀÇ as ¹öÁ¯¿¡´Â ÀÌ·± °ÍµéÀÌ »ç¶óÁú °ÍÀÌ´Ù.

½Éº¼µé

½Éº¼Àº ÇѱÛÀÚ ÀÌ»óÀ¸·Î ´ë¼Ò¹®ÀÚ¿Í ½ÊÁø¼ö, `_.$'·Î Á¶ÇյǴ °ÍÀÌ´Ù. °ÅÀÇ ´ëºÎºÐÀÇ ±â°è¿¡¼­ ¿©·¯ºÐµéÀº $À» ½Éº¼À̸§À¸·Î »ç¿ëÇÒ °ÍÀÌ´Ù(section ±â°è¿¡ ÀÇÁ¸ÇÏ´Â °Íµé¿¡¼­ ¾ð±ÞÇÑ °æ¿ì¸¦ Á¦¿ÜÇÏ°í´Â). ½Éº¼Àº 10Áø¼ö·Î ½ÃÀÛÇÏÁö ¾Ê´Â´Ù. ½Éº¼À» ¸¸µé¾î ³»´Â ¹æ¹ýÀº ¸¹À¸¸ç ±æÀÌÀÇ Á¦Çѵµ ¾ø´Ù. ½Éº¼À» ¸¸µé Àç·áÀÎ ±ÛÀÚ µéµµ ÃæºÐÇÏ´Ù. ½Éº¼Àº À§¿¡¼­ ¾ð±ÞÇÑ ¹®ÀÚ ÁýÇÕ¿¡ Æ÷ÇÔµÇÁö ¾Ê´Â ¹®ÀÚµéÀ̳ª ÆÄ ÀÏÀ» ½ÃÀÛÇÔÀ¸·Î½á ½Éº¼Àº ±× °æ°è°¡ Á¤ÇØÁø´Ù(¼Ò½º ÇÁ·Î±×·¥Àº ´º¶óÀÎÀ¸·Î ³¡³ª ¾ß Çϸç, ÆÄÀÏÀÇ ³¡Àº ½Éº¼À» °æ°èÁþ´Â °ÍÀ¸·Î µÉ ¼ö ¾ø´Ù). See section ½Éº¼.

±¸¹®

A statement ends at a newline character (`\n') or an "at" sign (`@'). The newline or at sign is considered part of the preceding statement. Newlines and at signs within character constants are an exception: they do not end statements. A statement ends at a newline character (`\n') or an exclamation point (`!'). The newline or exclamation point is considered part of the preceding statement. Newlines and exclamation points within character constants are an exception: they do not end statements. A statement ends at a newline character (`\n'); or (for the H8/300) a dollar sign (`$'); or (for the Hitachi-SH or the H8/500) a semicolon (`;'). The newline or separator character is considered part of the preceding statement. Newlines and separators within character constants are an exception: they do not end statements. ÇϳªÀÇ ±¸¹®Àº ´º¶óÀι®ÀÚ(`\n')À̳ª ¶óÀÎ ºÐ¸® ¿ªÇÒÀ» ÇÏ´Â ¹®ÀÚ·Î ³¡ÀÌ ³­´Ù. (¶óÀÎ ºÐ¸®ÀÚ´Â ÁÖ¼®¹®ÀÚ¿Í Ãæµ¹ÇÏÁö ¾Ê´Â´Ù¸é º¸Åë `;'ÀÌ´Ù. see section ±â°è¿¡ ÀÇÁ¸ÇÏ´Â °Íµé.) ´º¶óÀÎÀ̳ª ºÐ¸® ¹®ÀÚ´Â ¹Ù·Î ¾ÕÀÇ ±¸¹®ÀÇ ÀϺκÐÀ¸·Î Ãë±ÞµÈ´Ù. ¹®ÀÚ »ó¼ö¿¡ À־ ´º¶óÀΰú ºÐ¸®ÀÚ´Â ¿¡¿ÜÀε¥, ±×·² °æ¿ì´Â ±¸¹®ÀÇ ³¡À» ÀÇ ¹ÌÇÏÁö ¾Ê´Â´Ù.

±¸¹®À» ±â¼úÇÏ´Â µ¥ À־ end-of-file·Î ³¡À» ¸Î´Â ´Ù¸é ±×°ÍÀº ¿¡·¯·Î Ãë±Þ µÈ´Ù. ÀÔ·ÂÆÄÀÏ¿¡¼­ ¸¶Áö¸· ±ÛÀÚ´Â ¹Ýµå½Ã ´º¶óÀÎ À̾î¾ß ÇÑ´Ù.

±¸¹®À» ¿©·¯ÁÙ¿¡ °ÉÃÄ ¾²¾ß ÇÒ °æ¿ì¿¡´Â ´º¶óÀÎÀÇ ¾Õ¿¡ \¹®ÀÚ¸¦ Àû¾îÁÙ ¼ö ÀÖ ´Ù. as°¡ ¹é½½·¡½¬¿Í ÇÔ²² ´º¶óÀÎÀ» Àд ´Ù¸é µÑ´Ù ¹«½ÃµÈ´Ù. ¶ÇÇÑ ½Éº¼ À̸§À» ÁöĪÇÒ ¶§¿¡µµ ¿©·¯ºÐµéÀÇ ¼Ò½º ÇÁ·Î±×·¥¿¡ º°´Ù¸¥ ¿µÇâÀ» ÁÖÁö ¾ÊÀ¸¸é¼­ ¹é½½·¡ ½¬¿Í ÇÔ²² ´º¶óÀÎÀ» ½Éº¼ÀÇ Áß°£¿¡ ÀûÀ» ¼öµµ ÀÖ´Ù.

¸¸ÀÏ ÅÖºó ±¸¹®ÀÌ ³ª¿Â´Ù¸é ±×°ÍÀº È­ÀÌÆ® ¹®ÀÚ¸¦ Æ÷ÇÔÇÒ °ÍÀ̹ǷΠ¹«½ÃµÈ´Ù.

ÇϳªÀÇ ±¸¹®ÀÌ 0°³ ÀÌ»óÀÇ ¶óº§·Î ½ÃÀ۵ȴٸé, ±¸¹®ÀÇ Á¾·ù°¡ ¹«¾ùÀÎÁö¸¦ °áÁ¤ ÇÏ´Â Å° ½Éº¼(key symbol)ÀÌ ¼±ÅÃÀûÀ¸·Î µû¶ó ¿Ã ¼ö ÀÖ´Ù. Å° ½Éº¼Àº ³ª¸ÓÁö ±¸ ¹®ÀÇ ¹®¹ýÀ» °áÁ¤ÇÑ´Ù. ¸¸ÀÏ ½Éº¼ÀÌ `.'·Î ½ÃÀÛÇÑ´Ù¸é ±× ±¸¹®Àº ¾î¼Àºí¸® Áö½Ã ÀÚÀÓÀ» ¶æÇϸç, ÀϹÝÀûÀ¸·Î ¾î¶² ÄÄÇ»ÅÍ¿¡¼­µµ ±¦ÂúÀº °ÍÀÌ µÉ °ÍÀÌ´Ù. ½Éº¼ÀÌ ±¸¹®¿¡¼­ ÇϳªÀÇ ¹®ÀÚ·Î ½ÃÀÛÇÑ´Ù¸é ±×°ÍÀº ¾î¼Àºí¸® ¾ð¾î¿¡¼­ÀÇ ¸í·É¾îÀÓÀ» ¶æ ÇÑ´Ù. ´Ù¸¥ ±â°è¿¡¼­ÀÇ ¼­·Î ´Ù¸¥ as ¹öÁ¯Àº ´Ù¸¥ ¸í·É¾îµéÀ» ÀνÄÇÒ °ÍÀÌ´Ù. ÀÌ °ÍÀº »ç½Ç ½Éº¼ÀÌ ´Ù¸¥ ÄÄÇ»ÅÍÀÇ ¾î¼Àºí¸® ¾ð¾î»ó¿¡¼­ ´Ù¸¥ ¸í·É¾î·Î ¹¦»çµÇ´Â °ÍÀÌ´Ù.

¶óº§Àº ¹Ù·Î µÚ¿¡ ÄÝ·Ð(:)ÀÌ µû¶ó¿À´Â ÇϳªÀÇ ½Éº¼ÀÌ´Ù. È­ÀÌÆ® ¹®ÀÚ´Â ¶óº§ ÀÇ ¾ÕÀ̳ª ÄÝ·ÐÀÇ µÚ¿¡ ¿À´Â °ÍÀÌ Çã¿ëµÈ´Ù. ÇÏÁö¸¸ ¶óº§ÀÇ ½Éº¼°ú ÄÝ·Ð »çÀÌ¿¡ ´Â È­ÀÌÆ®¹®ÀÚ°¡ ¿Ã ¼ö ¾øÀ» °ÍÀÌ´Ù. (see section ¶óº§)

For HPPA targets, labels need not be immediately followed by a colon, but the definition of a label must begin in column zero. This also implies that only one label may be defined on each line.

label:     .directive    followed by something
another_label:           # This is an empty statement.
           instruction   operand_1, operand_2, ...

»ó¼ö

ÇϳªÀÇ »ó¼ö´Â ÇϳªÀÇ ¼ýÀÚÀ̸ç, ÀÌ°ÍÀº ¹®¸Æ¿¡ ½Å°æ ¾µ ÇÊ¿ä¾ø´Ù. ¿¹¸¦ µé¸é,

.byte  74, 0112, 092, 0x4A, 0X4a, 'J, '\J # All the same value.
.ascii "Ring the bell\7"                  # A string constant.
.octa  0x123456789abcdef0123456789ABCDEF0 # A bignum.
.float 0f-314159265358979323846264338327\
95028841971.693993751E-40                 # - pi, a flonum.

¹®ÀÚ »ó¼öµé

µÎÁ¾·ùÀÇ ¹®ÀÚ»ó¼öµéÀÌ ÀÖ´Ù. ÇϳªÀÇ ¹®ÀÚ»ó¼ö´Â 1¹ÙÀÌÆ®ÀÇ ¼öÄ¡Ç¥ÇöÀ¸·Î µÉ °ÍÀÌ´Ù. ¹®ÀÚ¿­ »ó¼ö´Â ¸¹Àº ¹ÙÀÌÆ®·Î µÉ °ÍÀÌ¸ç ±×µéÀÇ °ªÀº »ê¼ú °è»ê Ç¥Çö ½Ä¿¡¼­ »ç¿ëµÇÁö ¾ÊÀ» °ÍÀÌ´Ù.

¹®ÀÚ¿­

¹®ÀÚ¿­Àº ´õºí ÄõÅÍ(")»çÀÌ¿¡ ¾²¿©Áø´Ù. ¹®ÀÚ¿­Àº ´õºíÄõÅÍ¿Í ³Î ¹®ÀÚµéÀ» Æ÷ÇÔÇÒ °ÍÀÌ´Ù. Ưº°ÇÑ ¹®ÀÚ¸¦ ¹®ÀÚ¿­ ¼ÓÀ¸·Î ÃëÇÏ´Â ¹æ¹ýÀº ±× ¹®ÀÚµé¾Õ¿¡ ¹é ½½·¡½¬ `\' ¹®ÀÚ¸¦ ºÙÀÓÀ¸·Î½á ±×°ÍÀÇ ÀÏ»óÀûÀÎ Àǹ̷ΠºÎÅÍ Å»Ãâ½ÃÅ°´Â °ÍÀÌ´Ù. ¿¹¸¦ µé¸é, `\\'´Â ÇϳªÀÇ ¹é½½·¡½¬¸¦ ÀǹÌÇÑ´Ù. óÀ½ÀÇ \´Â µÎ¹ø° ±ÛÀÚ¸¦ ¿ø·¡ ±ÛÀÚÀÇ ¶æ´ë·Î Çؼ®Ç϶ó´Â °ÍÀ» ÀǹÌÇÑ´Ù. (as°¡ µÎ¹ø° \¸¦ À̽ºÄÉÀÌ ÇÁ ¹®ÀÚ·Î ÀνÄÇÏÁö ¾Êµµ·Ï ÇÑ´Ù´Â ÀǹÌÀÌ´Ù). À̽ºÄÉÀÌÇÁ ¿­ÀÇ ¿ÏÀüÇÑ ¸®½ºÆ® ¸¦ ¾Æ·¡¿¡ º¸ÀÌ°Ú´Ù.

\b
Mnemonic for backspace; for ASCII this is octal code 010.
\f
Mnemonic for FormFeed; for ASCII this is octal code 014.
\n
Mnemonic for newline; for ASCII this is octal code 012.
\r
Mnemonic for carriage-Return; for ASCII this is octal code 015.
\t
Mnemonic for horizontal Tab; for ASCII this is octal code 011.
\ digit digit digit
An octal character code. The numeric code is 3 octal digits. For compatibility with other Unix systems, 8 and 9 are accepted as digits: for example, \008 has the value 010, and \009 the value 011.
\x hex-digits...
A hex character code. All trailing hex digits are combined. Either upper or lower case x works.
\\
Represents one `\' character.
\"
Represents one `"' character. Needed in strings to represent this character, because an unescaped `"' would end the string.
\ anything-else
¾î¶² ´Ù¸¥ ¹®ÀÚ°¡ \¿¡ ÀÇÇØ À̽ºÄÉÀÌÇÁ µÈ´Ù¸é °æ°í°¡ Ãâ·ÂµÉ °ÍÀÌ°í `\'°¡ ¾ø´Ù°í »ý°¢ÇÏ°í ¾î¼ÀºíÀ» °è¼ÓÇÑ´Ù. ¸¸ÀÏ ¿©·¯ºÐµéÀÌ '\'¹®ÀÚ ´ÙÀ½ÀÇ µû¶ó¿À´Â ¹®ÀÚµéÀÇ ±ÛÀÚÇؼ®À» È®½ÇÈ÷ ¿øÄ¡ ¾ÊÀ» ¸ñÀûÀ¸·Î ÀÌ ½ºÄÉÀÌÇÁ ½ÃÄö½º¸¦ »ç¿ëÇÑ´Ù¸é ±¦ÂúÀº »ý°¢ÀÏÁöµµ ¸ð¸¥´Ù. ±×·¯³ª as°¡ ¾Æ¹«¸® ¹®ÀÚ¿¡ ´ëÇÑ ´Ù¸¥ Çؼ®À» ÇÏÁö ¾Ê´Â´Ù ÇÒÁö¶óµµ, as´Â ´ç½ÅÀÇ Äڵ尡 Ʋ·È´Ù´Â °ÍÀ» ¾Ë°í ÀÖÀ¸¸ç °æ°í¸¦ Ãâ·ÂÇÑ´Ù.

À̽ºÄÉÀÌÇÁ °¡´ÉÇÑ ¹®ÀÚµé°ú ¾î¶² À̽ºÄÉÀÌÇÁ°¡ Á¦°øµÇ´Â Áö´Â ¾î¼Àºí·¯ ¿¡ µû¶ó¼­ Å« Â÷ÀÌ°¡ ÀÖ´Ù. ¿ì¸®°¡ »ý°¢ÇÏ°í ÀÖ´Â À̽ºÄÉÀÌÇÁ ½ÃÄö½º ¿­Àº BSD 4.2 ¾î¼Àºí·¯°¡ ÀνÄÇÏ°í, º¸ÆíÀûÀÎ C ÄÄÆÄÀÏ·¯°¡ ÀνÄÇÏ´Â °ÍÀ¸·Î ÇÒ ÀÛÁ¤ÀÌ´Ù. ¸¸ÀÏ ¹Ì½É½´Ù¸é À̽ºÄÉÀÌÇÁ ½ÃÄö½º ¿­À» »ç¿ëÇÏÁö ¸»¶ó.

Number Constants

Characters

A single character may be written as a single quote immediately followed by that character. The same escapes apply to characters as to strings. So if you want to write the character backslash, you must write '\\ where the first \ escapes the second \. As you can see, the quote is an acute accent, not a grave accent. A newline (or at sign `@') (or dollar sign `$', for the H8/300; or semicolon `;' for the Hitachi SH or H8/500) immediately following an acute accent is taken as a literal character and does not count as the end of a statement. The value of a character constant in a numeric expression is the machine's byte-wide code for that character. as assumes your character code is ASCII: 'A means 65, 'B means 66, and so on.

¼ýÀÚ »ó¼öµé

as¿¡´Â ´ë»ó ±â°è¿¡¼­ ±×°ÍµéÀÌ ÀúÀåµÇ´Â ¹æ¹ý¿¡ µû¶ó ¼­·Î ´Ù¸¥ 3°¡Áö Á¾·ùÀÇ ¼ýÀÚ°¡ ÀÖ´Ù. Á¤¼ö(Integers)´Â C ¾ð¾î¿¡¼­ÀÇ int¿Í °°Àº °ÍÀÌ µÉ °ÍÀÌ´Ù. Bignums´Â Á¤¼öÀ̳ª, ±×°ÍÀº 32ºñÆ® º¸´Ù ´õ ¸¹ÀÌ ÀúÀåµÈ ´Ù. Flonums´Â ºÎµ¿¼Ò¼ýÁ¡ ¼ýÀÚÀÌ´Ù. ¾Æ·¡¿¡¼­ ¼³¸íÇÑ´Ù.

Á¤¼ö

ÀÌÁø¼ö´Â `0b'³ª `0B'´ÙÀ½¿¡ 0°³ÀÌ»óÀÇ ÀÌÁø¼ö Çü½ÄÀÇ ½ÊÁø¼ö `01'ÀÌ µÚ µû¸¥´Ù.

ÆÈÁø¼ö´Â `0'´ÙÀ½¿¡ 0°³ÀÌ»óÀÇ ÆÈÁø¼ö·Î µÉ ¼ö ÀÖ´Â ½ÊÁø¼ö(`01234567')°¡ µÚµû¸¥´Ù.

½ÊÁø¼ö´Â 0ÀÌ ¾Æ´Ñ ¼ýÀÚ·Î ½ÃÀÛÇϸç 0°³ÀÌ»óÀÇ ½ÊÁø¼ö(`0123456789')°¡ µÚµû¸¥´Ù.

16Áø¼ö´Â `0x'³ª `0X'´ÙÀ½¿¡ 0°³ ÀÌ»óÀÇ 16Áø¼ö(`0123456789abcdefABCDEF')°¡ µÚµû¸¥´Ù.

Á¤¼ö´Â º¸Åë °ªÀ» °¡Áø´Ù. À½¼ö¸¦ Ç¥½ÃÇϱâ À§Çؼ­´Â `-'¸¦ ¾Õ¿¡ ºÙÀδÙ. (see section Á¢µÎ»ç Á¶ÀÛÀÚ).

Bignums

Bignums´Â 32ºñÆ® ÀÌ»óÀÇ °ªÀ» °¡Áø´Ù´Â °ÍÀ» Á¦¿ÜÇÏ°í´Â Á¤¼ö(integer)¿Í °°Àº ¹®¹ý°ú Àǹ̸¦ °¡Áø´Ù. ÀÌ·¯ÇÑ ±¸º°Àº ¾î¶² °÷¿¡¼­´Â bignums°¡ Çã¿ë µÇÁö ¾ÊÀ¸¸é¼­ Á¤¼ö´Â Çã¿ëµÇ´Â ¹®Á¦ ¶§¹®¿¡ »ý°å´Ù.

Flonums

flonumÀº ºÎµ¿ ¼Ò¼ýÁ¡ ¼ýÀÚ(floating point number)ÀÇ À翬ÀÌ´Ù. ÀÌ º¯È¯Àº °£Á¢ÀûÀ¸·Î ÁøÇàµÈ´Ù. text¿¡¼­ÀÇ ½ÊÁø ºÎµ¿ ¼Ò¼öÁ¡ ¼ýÀÚ´Â as¿¡ ÀÇÇØ ÀϹÝÀû ÀÎ ¹ÙÀ̳ʸ® ºÎµ¿ ¼Ò¼ýÁ¡ ¼ýÀÚ·Î ÃæºÐÇÑ Á¤¹Ðµµ¸¦ °¡Áö¸é¼­ º¯È¯µÈ´Ù. ÀÌ ÀÏ ¹ÝÀûÀÎ ºÎµ¿¼Ò¼ýÁ¡ ¼ýÀڴ ƯÁ¤ÇÑ ÄÄÇ»ÅÍÀÇ ºÎµ¿¼Ò¼ýÁ¡ Æ÷¸ËÀ¸·Î asÀÇ Æ÷Æÿ¡ ÀÇÇØ º¯È¯µÇ´Â °ÍÀÌ´Ù.

ºÎµ¿¼Ò¼ýÁ¡ ¼ýÀÚÀÇ ±¸¼ºÀº ´ÙÀ½°ú °°´Ù.

Àû¾îµµ ÇϳªÀÇ Á¤¼ö ºÎºÐÀ̳ª ¼Ò¼öÁ¡ ÀÌÇÏ ºÎºÐÀÌ ÀÖ¾î¾ß ÇÑ´Ù. ºÎµ¿ ¼Ò¼ýÁ¡ ¼ýÀÚ´Â º¸Åë ½ÊÁø¼ö¿¡ ±âÃÊÇÑ´Ù.

as´Â Á¤¼ö(integers)¸¦ »ç¿ëÇÏ¿© ¸ðµç 󸮸¦ ÇÑ´Ù. Flonums´Â as°¡ µ¹¾Æ°¡´Â ¾î¶°ÇÑ ºÎµ¿ ¼Ò¼ýÁ¡ Çϵå¿þ¾î¿¡ µ¶¸³ÀûÀ¸·Î °è»êµÈ´Ù.


Go to the first, previous, next, last section, table of contents.