U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » First Firebird for U++ steps
Re: First Firebird for U++ steps [message #17114 is a reply to message #17088] Tue, 29 July 2008 16:09 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

I have refactored decimal class a bit:
decimal is now Decimal
I think you wanted braces here:
    if(sign!=d.sign) 
        if(sign>d.sign) return 1; 
        if(sign<d.sign) return -1;

This patch is also included.
I changed
memcpy(number, d.number, D_SIZE * sizeof(int));

to
memcpy(number, d.number, D_SIZE * sizeof(int32));

I also formatted code in upp way (please follow our style in your firebird plugin) and changed throw messages from uppercase to lowercase.

I'm gonna try to use this class in my app and check if it works well. I will also modify postgres plugin to be compatibile with decimal (only a try..)
  • Attachment: Decimal.7z
    (Size: 4.08KB, Downloaded 439 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FireBird plugin and test program
Next Topic: SQLite: Date and Time
Goto Forum:
  


Current Time: Wed Apr 29 08:46:23 GMT+2 2026

Total time taken to generate the page: 0.01240 seconds