Cifdef, Cifndef, Cendif Command Example - HP DDL D40 Reference Manual

Data definition language
Table of Contents

Advertisement

DDL Compiler Commands

CIFDEF, CIFNDEF, CENDIF Command Example

The following example shows the use of the CIFNDEF, CIFDEF and CENDIF compiler
commands.
10> DDL
!?C CSRC
!?CIFNDEF EMP
!CONSTANT EMP VALUE "JYOTI".
!?CIFDEF
EMP
!CONSTANT EMP VALUE "RAM".
!?NOC
!?C CSRC
Output source for C is opened on $ADE101.BUG.CSRC
!?CIFNDEF EMP
!CONSTANT EMP VALUE "JYOTI".
Constant EMP defined.
C output produced for EMP.
!?CIFDEF EMP
!CONSTANT EMP VALUE "RAM".
Constant EMP defined.
C output produced for EMP.
!?CENDIF
!?CENDIF
!?NOC
Output source for C is closed.
The 'C' source file csrc contains the following.
/* SCHEMA PRODUCED DATE - TIME : 3/10/2000 - 19:39:53 */
#ifndef EMP
#pragma section emp
* Constant EMP created on 03/10/2000 at 19:40 */
#define EMP "JYOTI"
#ifdef EMP
#pragma section emp
/* Constant EMP created on 03/10/2000 at 19:41 */
#define EMP "RAM"
#endif
#endif
Data Definition Language (DDL) Reference Manual—426798-002
CIFDEF, CIFNDEF, CENDIF Command Example
9- 18

Advertisement

Table of Contents
loading

Table of Contents