G
Guest
I am contemplating converting a huge collection of functions from C++ to
VB.NET.
I am concerned with a style used in the original code where a variable is
set to a constant value with the # define preprocessor symbol. For example:
void Mysub (...){
# define indx 2
double x[indx] = {2.3, 3.4};
blah blah;
# undef indx
}
This all seems silly to me and I would like to replace it (in fact I'll have
to replace it) with something like
dim x(2) as double or even
dim i as int = 2
dimx(i) as double
Does anyone know the reason behind this define/undefine preprocessor symbols
stuff? Can anyone see any harm in my replacing them with standard variables
having procedure scope?
VB.NET.
I am concerned with a style used in the original code where a variable is
set to a constant value with the # define preprocessor symbol. For example:
void Mysub (...){
# define indx 2
double x[indx] = {2.3, 3.4};
blah blah;
# undef indx
}
This all seems silly to me and I would like to replace it (in fact I'll have
to replace it) with something like
dim x(2) as double or even
dim i as int = 2
dimx(i) as double
Does anyone know the reason behind this define/undefine preprocessor symbols
stuff? Can anyone see any harm in my replacing them with standard variables
having procedure scope?