Google

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


¥×¥ê¥×¥í¥»¥Ã¥µ

Asir ¤Î¥æ¡¼¥¶¸À¸ì¤Ï C ¸À¸ì¤òÌϤ·¤¿¤â¤Î¤Ç¤¢¤ë. C ¤ÎÆÃħ¤È¤·¤Æ, ¥×¥ê¥×¥í¥»¥Ã¥µ cpp ¤Ë¤è¤ë¥Þ¥¯¥íŸ³«, ¥Õ¥¡¥¤¥ë¤Î¥¤¥ó¥¯¥ë¡¼¥É ¤¬¤¢¤ë¤¬, Asir ¤Ë¤ª¤¤¤Æ¤â¥æ¡¼¥¶¸À¸ì¥Õ¥¡¥¤¥ë¤ÎÆÉ¤ß¹þ¤ß¤ÎºÝ cpp ¤òÄ̤·¤Æ¤«¤éÆÉ¤ß¹þ¤à¤³¤È¤È¤·¤¿. ¤³¤ì¤Ë¤è¤ê¥æ¡¼¥¶¸À¸ì ¥Õ¥¡¥¤¥ëÃæ¤Ç #include, #define, #if ¤Ê¤É¤¬»È¤¨¤ë.

  • #include
    cpp ¤ËÆÃ¤Ë°ú¿ô¤òÅϤµ¤Ê¤¤¤¿¤á, ¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤Ï, #include ¤¬½ñ¤«¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¥Ç¥£¥ì¥¯¥È¥ê¤Ç¥µ¡¼¥Á¤µ¤ì¤ë.
  • #define
    ¤³¤ì¤Ï, C ¤Ë¤ª¤±¤ë¤Î¤ÈÁ´¤¯Æ±ÍͤËÍѤ¤¤ë¤³¤È¤¬¤Ç¤­¤ë.
  • #if
    /*, */ ¤Ë¤è¤ë¥³¥á¥ó¥È¤ÏÆþ¤ì»Ò¤Ë¤Ç¤­¤Ê¤¤¤Î¤Ç, ¥×¥í¥°¥é¥à ¤ÎÂ礭¤ÊÉôʬ¤ò¥³¥á¥ó¥È¥¢¥¦¥È¤¹¤ëºÝ¤Ë, #if 0, #endif ¤ò»È¤¦¤ÈÊØÍø¤Ç¤¢¤ë.

¼¡¤ÎÎã¤Ï, `defs.h' ¤Ë¤¢¤ë¥Þ¥¯¥íÄêµÁ¤Ç¤¢¤ë.

#define ZERO 0
#define NUM 1
#define POLY 2
#define RAT 3
#define LIST 4 
#define VECT 5
#define MAT 6
#define STR 7
#define N_Q 0
#define N_R 1
#define N_A 2
#define N_B 3
#define N_C 4
#define V_IND 0
#define V_UC 1
#define V_PF 2
#define V_SR 3
#define isnum(a) (type(a)==NUM)
#define ispoly(a) (type(a)==POLY)
#define israt(a) (type(a)==RAT)
#define islist(a) (type(a)==LIST)
#define isvect(a) (type(a)==VECT)
#define ismat(a) (type(a)==MAT)
#define isstr(a) (type(a)==STR)
#define FIRST(L) (car(L))
#define SECOND(L) (car(cdr(L)))
#define THIRD(L) (car(cdr(cdr(L))))
#define FOURTH(L) (car(cdr(cdr(cdr(L)))))
#define DEG(a) deg(a,var(a))
#define LCOEF(a) coef(a,deg(a,var(a)))
#define LTERM(a) coef(a,deg(a,var(a)))*var(a)^deg(a,var(a))
#define TT(a) car(car(a))
#define TS(a) car(cdr(car(a)))
#define MAX(a,b) ((a)>(b)?(a):(b))


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