Use the `Ifdef' directive:
[ menu;
! code here is always compiled
#Ifdef CreditRoutine;
! code here is compiled if CreditRoutine is defined
#Else;
! code here is compiled if CreditRoutine is not defined
#Endif;
];
Note that this requires CreditRoutine to be defined before your library
is included.
Another possibility is to pass the address of CreditRoutine as an
(optional) parameter:
[ menu creditroutine;
if (creditroutine == 0) {
! do something
} else {
! do something else
}
];
and then in the code that calls `menu':
menu(#r$CreditRoutine);
-- Gareth Rees