[P&AM Lab] Echo.c
Grigoriy A. Sitkarev
sitkarev �� komitex.ru
�� ��� 6 23:55:01 MSK 2010
��� �������, ���� test.c, ������������ � -DPRINT_MESSAGE � ���, �
���������� ��� �����. ���������� ����� ������ ������ ��� �������������
����� define � ����� ������ ����� (����� ����������):
#define PRINT_MESSAGE
$ gcc -Wall -o test test.c
�
$ gcc -Wall -DPRINT_MESSAGE -o test test.c
��� ������������� ��������� if � ifndef �������������� �������� �� ��
���������� �� ����� ������ ��� ��� (if not defined). ��� �����
������������ � ���������� ��, ����� ��� � � ����� ��.
#if !PRINT_MESSAGE
����� ������ ������� ����� ��� �����. ���� ������ ��������� ���
������������ �������� ���������� ����� ����� ���������, ��� ����������
���������� ���������. ����� ����, ���������� ��� � ����� ��������� ��
���������� ��� (��� ������).
--
�.�.
����� ����� �����:
> �������� �������������, ������������.
> �������� ���� �������� � �������� ������� ������ echo. �������� �������� ����� �� �������, �� ���� ������� �ӣ �� �������� �������.
> ������ �� ������� ��� ������ ������: #if !ENABLE_FEATURE_FANCY_ECHO
> � ����� ������ ����� ���� ������� ��������� #if.... #else...#endif.
----------- �������� ����� -----------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 165 bytes
Desc: �����������
URL: <http://amplab.syktsu.ru/pipermail/lab/attachments/20101206/2b5b09a2/attachment.c>
��������� ���������� � ������ �������� Lab