óÀ½, ÀÌÀü, ´ÙÀ½, ¸¶Áö¸· Àý·Î °¡±â, ¸ñÂ÷.
¿ø¹®½ÃÀÛ
- Grantfiles. See See section Separate compilation.
- Precisions. Multiple integer and real precisions are supported,
as well as signed and unsigned variants of the integer modes.
- DESCR built-in. The new built-in function
DESCR ( <descriptor argument> ) returns a pointer to
STRUCT( addr PTR, length ULONG ) where <descriptor argument> can be
anything the compiler can handle but at least a location of any mode
(except synchronizing modes) and any character string or powerset value.
(A temporary location within the current stack frame may be allocated
if an expression is used.)
CHILL does not permit the writing of procedures with parameters of
any type. Yet some interfaces--in particular those to system
calls--require
the handling of a wide range of modes, e.g. any string mode, any structure
mode, or any powerset mode. This could be handled by specifying two
parameters (PTR, INT for the length) but this is error-prone (no guarantee
the same location is used after in ADDR and LENGTH), and it will not be
possible for expressions.
Caveats: This feature permits the programmer to obtain the address of
a literal (if the compiler takes this shortcut--see 1st example below).
If hardware features protect constant parts of the program, erronous
abuse will be detected.
Examples:
OFFER_HANDLER( descr("dbs"), ->dbs);
SYNMODE m_els = SET( ela, elb, elc );
SYNMODE m_elsel = POWERSET m_els;
DCL user_buf STRUCT( a mx, b my, c mz);
DCL select POWERSET m_elsel;
select := m_elsel[LOWER(m_els) : UPPER(m_els)];
GET_RECORD( relation, recno, descr(user_buf), descr(select) );
PUT_RECORD( relation, recno, descr(user_buf.b), descr(m_elsel[elb]) );
- LENGTH built-in on left-hand-side. The LENGTH built-in may be
used on the left-hand-side of an assignment, where its argument is a VARYING
character string.
¿ø¹®³¡
- grant ÆÄÀÏ. ºÐ¸® ÄÄÆÄÀÏÀýÀ» º¸¶ó.
- Á¤¹Ðµµ. Á¤¼ö¸ðµåÀÇ ºÎÈ£ÀÖ´Â º¯¼ö¿Í ºÎÈ£¾ø´Â º¯¼ö»Ó¸¸ÀÌ ¾Æ´Ï¶ó ´ÙÁß Á¤¼ö¿Í ½Ç¼ö Á¤¹Ðµµ°¡ Áö¿øµÈ´Ù.
- DESCR ³»Àå. »õ·Î¿î ³»ÀåÇÔ¼ö DESCR(<descriptor argument> )Àº STRUCT(addr PTR, length ULONG)¿¡°Ô ÇϳªÀÇ Æ÷ÀÎÅ͸¦ ¹ÝȯÇÑ´Ù.¿©±â¼ <descriptor argument>´Â ÃÖ¼ÒÇÑ ¾î¶² ¸ðµå(µ¿±â¸ðµåÁ¦¿Ü)ÀÇ À§Ä¡¿Í ¾î¶°ÇÑ ¹®ÀÚ¿ ¶Ç´Â powerset °ªÀ» Á¦¿ÜÇÑ ÄÄÆÄÀÏ·¯°¡ ´Ù·ê ¼ö ÀÖ´Â ¸ðµç °ÍÀ» ÇÒ ¼ö ÀÖ´Ù. (ÇöÀç ½ºÅà ÇÁ·¹ÀÓ¾ÈÀÇ Àӽà À§Ä¡´Â ¸¸¾à Ç¥ÇöÀÌ »ç¿ëµÈ´Ù¸é ÇÒ´çµÉÁöµµ ¸ð¸¥´Ù.) CHILLÀº ¾î¶°ÇÑ typeÀÇ ¸Å°³º¯¼ö¸¦ °¡Áø procedureÀÇ ÀÛ¼ºµµ Çã¿ëÇÏÁö ¾Ê´Â´Ù. ¾ÆÁ÷ ¸î¸î ÀÎÅÍÆäÀ̽º-ƯÈ÷ ½Ã½ºÅÛ ÄÝ--´Â ¸ðµåÀÇ ³ÐÀº ¿µ¿ªÀ» ´Ù·ç±æ ¿ä±¸ÇÑ´Ù. Áï, ¹®ÀÚ¿ ¸ðµå, ±¸Á¶Ã¼ ¸ðµå, powerset ¸ðµå. ÀÌ°ÍÀº µÎ°³ÀÇ ¸Å°³º¯¼ö(PTR, ±æÀÌ¿¡ ´ëÇÑ INT)¸¦ ÁöÁ¤ÇÔÀ¸·Î½á Ãë±ÞµÉ ¼ö ÀÖÀ¸³ª ÀÌ°ÍÀº ¿¡·¯°¡ ¹ß»ýÇϱ⽱´Ù.(°°Àº À§Ä¡°¡ ADDR°ú LENGTH¾È¿¡¼ ³ªÁß¿¡ »ç¿ëµÈ´Ù´Â º¸ÀåÀ» ÇÒ ¼ö ¾ø´Ù.) ±×¸®°í ±×°ÍÀº Ç¥Çö¿¡ ´ëÇؼ ºÒ°¡´ÉÇÏ´Ù. ÁÖÀÇ: ÀÌ·¯ÇÑ Æ¯¼ºÀº ÇÁ·Î±×·¡¸Ó°¡ ÀÚ·áÀÇ ÁÖ¼Ò¸¦ ¾òÀ» ¼ö ÀÖµµ·Ï Çã¿ëÇÑ´Ù(¸¸¾à ÄÄÆÄÀÏ·¯°¡ ÀÌ·¯ÇÑ Ã¸°æÀ» °¡Áö°í ÀÖ´Ù¸é-¾Æ·¡ÀÇ Ã¹¹ø° ¿¹¸¦ º¸¶ó). ¸¸¾à Çϵå¿þ¾î Ư¼ºÀÌ ÇÁ·Î±×·¥ÀÇ »ó¼ö ºÎºÐÀ» º¸È£ÇÑ´Ù¸é, À߸øµÈ ³²¿ëÀº Á¦°ÅµÉ °ÍÀÌ´Ù.
¿¹:
OFFER_HANDLER( descr("dbs"), ->dbs);
SYNMODE m_els = SET( ela, elb, elc );
SYNMODE m_elsel = POWERSET m_els;
DCL user_buf STRUCT( a mx, b my, c mz);
DCL select POWERSET m_elsel;
select := m_elsel[LOWER(m_els) : UPPER(m_els)];
GET_RECORD( relation, recno, descr(user_buf), descr(select) );
PUT_RECORD( relation, recno, descr(user_buf.b), descr(m_elsel[elb]) );
- ¿ÞÂÊ¿¡ LENGTH ³»Àå. LENGTH ³»ÀåÀº VARYING ¹®ÀÚ¿À» ÀÎÀÚ·Î °¡Áö´Â ÁöÁ¤¹®ÀÇ ¿ÞÂÊÆí¿¡ »ç¿ëµÉÁöµµ ¸ð¸¥´Ù.
óÀ½, ÀÌÀü, ´ÙÀ½, ¸¶Áö¸· Àý·Î °¡±â, ¸ñÂ÷.