12.11.2013 Views

Luiz Thiago Silva DESENVOLVIMENTO DE UM ... - Ginux

Luiz Thiago Silva DESENVOLVIMENTO DE UM ... - Ginux

Luiz Thiago Silva DESENVOLVIMENTO DE UM ... - Ginux

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A seguir é mostrado o autômato que representa a diretiva #include.<br />

Figura 4: Módulo include<br />

4.1.2 Diretiva #define<br />

A diretiva #define especifica um identificador e atribui a este um<br />

valor, quando o identificador é encontrado no código é substituído pelo<br />

valor atribuído na diretiva. O padrão ANSI C refere-se ao identificador<br />

como um nome de macro e ao processo de substituição como substituição<br />

de macro. (SCHILDT, 1996).<br />

Forma geral:<br />

Exemplo:<br />

#define nome_da_macro caracteres<br />

#define tamanho 10<br />

No exemplo acima foi especificado a macro tamanho de valor 10.<br />

23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!