Am Sonntag, 5. Oktober 2008 15:35 schrieb Ludolf Holzheid:
> On 2008-10-05 10:31 +0200, Christian Stimming wrote:
> > #define AQBANKING_VERSIONNUMBER \
> >   10000 * AQBANKING_VERSION_MAJOR \
> >   + 100 * AQBANKING_VERSION_MINOR \
> >   + AQBANKING_VERSION_PATCHLEVEL
> >
> > which enables a condition like this
> >
> > #if AQBANKING_VERSIONNUMBER >= 040000
>
> This would trigger the new code for aqbanking 1.63.84 and above, as
> `040000' would be parsed as an octal number.

Oops. This was of course not intended to be taken as an octal number.

#if AQBANKING_VERSIONNUMBER >= 40000

it would be, then. The point is: It can be combined into a decimal number and 
there are big packages out there who do that already successfully.

> > which is how they have something available in boost, or like the method
> > in qt which uses the same but in hex,
> >
> Ah, o.k., so s/16/8/g and s/32/16/g (in this order) then for the
> define above, which also voids the problem with 64 bit preprocessor
> constants ;-)

Right, so in hex (as in Qt) this would be 

#define AQBANKING_VERSIONNUMBER \
  AQBANKING_VERSION_MAJOR << 16 \
  + AQBANKING_VERSION_MINOR << 8 \
  + AQBANKING_VERSION_PATCHLEVEL

I think both forms have pros and cons. Martin, which one would you prefer?

Christian

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Aqbanking-devel mailing list
Aqbanking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aqbanking-devel

Reply via email to