Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

[תÔØ] Lua ÖÐÓë C ²»Í¬µÄÉè¼Æ

¾¡¹Ü Lua µÄ¹Ø¼ü´ÊµÄÉè¼Æ£¬ÔËÐзûµÄÉè¼Æ£¬Óï·¨µÄÉè¼ÆµÈ·½ÃæÓë C ºÜÏàËÆ£¬µ«ÎÒÃÇ»¹Òª×¢ÒâÆäÃ÷ÏÔ²»Í¬µÄµØ·½¡£
Ìõ¼þÅжÏʱµÄÕæ¼ÙÌõ¼þ
Lua ÖÐËùÓеÄÖµ¶¼¿ÉÒÔ×÷ΪÌõ¼þ¡£ÔÚ¿ØÖƽṹµÄÌõ¼þÖгýÁË false ºÍ nil Ϊ¼Ù£¬ÆäËûÖµ¶¼ÎªÕæ¡£ËùÒÔ Lua ÈÏΪ 0 ºÍ ¿Õ´® ¶¼ÊÇÕæ¡£
¶ø C ÖУ¬ÈÏΪֻҪÊÇÔÚÄÚ´æÖбíÏÖΪ 0 ÖµµÄ·ûºÅ¶¼Îª¼Ù¡£
×Ö·û´®
Lua ÖÐ×Ö·û´®µÄ¶¨ÒåÊÇ ×Ö·ûµÄÐòÁС£lua µÄ×Ö·û´®¿ÉÒÔ°üº¬ÈκÎÊýÖµ×Ö·û£¬°üÀ¨Ç¶ÈëµÄ 0¡£ÕâÒâζ×ÅÄã¿ÉÒÔ´æ´¢ÈÎÒâµÄ¶þ½øÖÆÊý¾ÝÔÚÒ»¸ö×Ö·û´®Àï¡£Lua ±¾ÉíÓÐÏàÓ¦µÄº¯ÊýÀ´´¦ÀíÕâÑùµÄ×Ö·û´®¡£
¶ø C ÓïÑÔÖУ¬ËäȻҲ¿ÉÒÔÔÚÒ»¸ö×Ö·û´®Öдæ·Å 0£¬µ«Æä×Ö·û´®´¦Àíº¯Êý²»ÄÜÕýÈ·´¦Àí·ÅÔÚÖмäµÄÁãÖµ£¬ÒòΪ C ÖеÄËã·¨²»ÊÇÓó¤¶ÈÀ´×öÅжϣ¬¶øÊÇÒÔÓöµ½µÚÒ»¸öÁãÖµÀ´Åжϵġ£
תÒå×Ö·û:
\a bell                                 \b back space -- ºóÍË
\f form feed -- »»Ò³                    \n newline -- »»ÐÐ
\r carriage return -- »Ø³µ              \t horizontal tab -- ÖƱí
\v vertical tab                         \\ backslash -- "\"
\" double quote -- Ë«ÒýºÅ               \' single quote -- µ¥ÒýºÅ
\[ left square bracket -- ×óÖÐÀ¨ºÅ      \] right square bracket -- ÓÒÖÐÀ¨ºÅ
»¹¿ÉÒÔÓÃ[[…]]±íʾ×Ö·û´®,ÕâÖÖÐÎʽµÄ×Ö·û´®¿ÉÒÔ°üº¬¶àÐпÉÒÔǶÌ×ÇÒ²»»á½âÊÍתÒåÐòÁС£
ÔËÐÐʱ£¬Lua»á×Ô¶¯ÔÚstringºÍnumberÖ®¼ä×Ô¶¯½øÐÐÀàÐÍת»»¡£
¹ØϵÔËËã·û
Lua ÖеIJ»µÈºÅÊÇ ~=£¬
¶ø C ÖеIJ»µÈºÅÊÇ !=¡£
Âß¼­ÔËËã·û
Lua ÖеÄÂß¼­ÔËËã·ûÊÇ and, or, not£¬¶ø C ÖеÄÂß¼­ÔËËã·ûÊÇ &&, ||, !¡£¶øÇÒËüÃǵÄÓ÷¨ºÜ´óµÄ²»Ò»Ñù£¬Lua µÄÂß¼­ÔËËã·ûµÄÓ÷¨ÏÔµÃÓеã“С¼¼ÇÉ”¡£
Lua Âß¼­ÔËËã·ûÈÏΪ false ºÍ nil ÊǼ٣¨false£©£¬ÆäËûΪÕ棬0Ò²ÊÇtrue¡£
and ºÍ or µÄÔËËã½á¹û²»ÊÇ true ºÍ false£¬¶øÊǺÍËüµÄÁ½¸ö²Ù×÷ÊýÏà¹Ø¡£
not µÄ½á¹ûÒ»Ö±·µ»Ø false »òÕß true¡£
a and b -- Èç¹ûaΪfalse£¬Ôò·µ»Øa£¬·ñÔò·µ»Øb
a or b -- Èç¹ûaΪtrue£¬Ôò·µ»Øa£¬·ñÔò


Ïà¹ØÎĵµ£º

c/C++±àÒëµÄ³ÌÐòÕ¼ÓõÄÄÚ´æÇé¿ö ÎÄ×Ö³£Á¿Çø

Ê×ÏÈ¿´ÏÂÏÂÃæÕâ¶Î£º
int main()
{
char *name = "fengkewei";
char name1[] = "fengkewei";
char *name2 = "fengkewei";
char *name3 = "woaifengkewei";
int i = 10;
int j = 10;
int k = 11;
return 0;
}
ÈôÄú¾õµÃËüÃÇÓ¦¸Ã¶¼±£´æÔÚÄÚ´æÖеÄÒ»¿éµØ·½£¬ÄÇÇëÍùÏ¿´¡£¡£¡£¡£
ÏÂÃæÊDZàÒëÆ÷Ϊ¸÷¸ö±äÁ¿·ÖÅäµÄÄÚ´æµØ ......

JAVA²Ù×÷XMLµÄÍêÕûÀý×Ó——W3C DOMƪ

ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
 <book>
  <name>¹þÀï²¨Ì ......

͸ÎöC/SºÍB/SÁ½ÖÖģʽµÄ²âÊÔ

C/SÓÖ³ÆClient/Server»ò¿Í»§/·þÎñÆ÷ģʽ¡£·þÎñÆ÷ͨ³£²ÉÓøßÐÔÄܵÄPC¡¢¹¤×÷Õ¾»òСÐÍ»ú£¬²¢²ÉÓôóÐÍÊý¾Ý¿âϵͳ£¬ÈçOracle¡¢Sybase¡¢Informix»ò SQL Server¡£¿Í»§¶ËÐèÒª°²×°×¨ÓõĿͻ§¶ËÈí¼þ¡£
¡¡¡¡B/£ÓÊÇBrower/ServerµÄËõд£¬¿Í»§»úÉÏÖ»Òª°²×°Ò»¸öä¯ÀÀÆ÷£¨Browser£©£¬ÈçNetscape Navigator»òInternet Explorer£¬·þÎñÆ÷°²×°O ......

C/C++ Îļþ¶Áд²Ù×÷×ܽá

ÔÚ±à³ÌµÄ¹ý³ÌÖУ¬ÎļþµÄ²Ù×÷ÊÇÒ»¸ö¾­³£Óõ½µÄÎÊÌ⣬ÔÚC++BuilderÖУ¬¿ÉÒÔʹÓöàÖÖ·½·¨¶ÔÎļþ²Ù×÷£¬ÏÂÃæÎҾͰ´ÒÔϼ¸¸ö²¿·Ö¶Ô´Ë×÷Ïêϸ½éÉÜ£¬¾ÍÊÇ£º
1¡¢»ùÓÚCµÄÎļþ²Ù×÷£»
2¡¢»ùÓÚC++µÄÎļþ²Ù×÷£»
3¡¢»ùÓÚWINAPIµÄÎļþ²Ù×÷£»
4¡¢»ùÓÚBCB¿âµÄÎļþ²Ù×÷£»
5¡¢ÌØÊâÎļþµÄ²Ù×÷¡£
¡¡
Ò¼¡¢»ùÓÚCµÄÎļþ²Ù×÷
¡¡¡¡ÔÚANSI CÖУ¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ