home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum3.lzh
/
DEFS
/
easyc.h
Wrap
Text File
|
1987-10-23
|
3KB
|
70 lines
/******************************************************************************/
/* */
/* Die folgenden 'defines' erm÷glichen eine komfortablere Benutzung der */
/* 'C' - Operatoren und Programmstrukturen. Durch Einbinden dieses Moduls */
/* mit '#include <easyc.h>' in Ihr Programm k÷nnen Sie die Lesbarkeit fast */
/* auf einen von PASCAL oder MODULA 2 gewohnten stand bringen. */
/* */
/* Die 'defines' sind dem Artikel EASY C von Pete Orlin und John Heath, */
/* BYTE vom Mai 1986 entnommen. */
/* */
/******************************************************************************/
/* Logical operators */
#define AND && /* logical AND */
#define OR || /* logical OR */
#define NOT ! /* logical NOT */
#define EQ == /* equal value comparison */
#define NE != /* not equal value comparison */
#define LT < /* less than value comparison */
#define LE <= /* less than or equal to value comparison */
#define GT > /* greater than value comparison */
#define GE >= /* greater than or equal to value comparison */
/* Bitwise operators */
#define BAND & /* bitwise AND */
#define BOR | /* bitwise OR */
#define BXOR ^ /* bitwise exclusive OR */
#define BNOT ~ /* bitwise NOT */
#define LSHF << /* left shift */
#define RSHF >> /* right shift */
/* Arithmetic operators */
#define INC ++ /* increment */
#define DEC -- /* decrement */
#define MOD % /* modulo division */
/* IF...THEN...ELSEIF...ELSE construct */
#define IF(e) { if (e) /* if statement */
#define THEN { /* then statement */
#define ELSEIF(e) } else if (e) { /* elseif statement */
#define ELSE } else { /* else statement */
#define ENDIF ; } } /* end of if statement */
/* CASE construct */
#define CASE(e) { switch (e) { /* head of case */
#define CASEOF(e) case e: { /* case block */
#define DEFCASE default: { /* default case block */
#define ENDCOF } break ; /* end of case block */
#define ENDCASE } } /* end of case */
/* WHILE construct */
#define WHILE(e) { while (e) { /* while statement */
#define ENDW ; } } /* end of while statement */
/* FOR construct */
#define FOR(e) { for (e) { /* for statement */
#define ENDF ; } } /* end of for statement */
/* BEGIN...END construct */
#define BEGIN { /* beginning of block */
#define END } /* end of block */