BaaNovva
14th February 2007, 17:29
Why double hash are used in #defines ?

Example extract :
#define ENABLE.DISABLE.COMMANDS.ADDRESS(ADRS)
^ if not isspace(##ADRS##) then
^ enable.commands("address.##ADRS##")
^ else
^ disable.commands("address.##ADRS##")
^ endif

_Ralph_
14th February 2007, 19:33
This allows you to use a macro substitution.

For example


long var02.o, var03.o, var04.o, var05.o, var06.o, var07.o

#define V(x) var0##x##.o


function long calcule()
{

V(6) = 12
V(3) = 10

V(7) = V(6)+V(3)

| V(7) = var07.o now its value is 22 =)
}


Take a search for Macro Substituion to learn more about it :)

NPRao
14th February 2007, 22:17
Refer to the link - Token pasting (preprocessor) (http://www.baanboard.com/programmers_manual_baanerp_help_3gl_features_token_pasting_preprocessor)

BaaNovva
15th February 2007, 16:23
Thanks a lot... Ralph and NP Rao...
Your prompt reply and excellant info fixed my problem.

Thanx & best regards...