max.wanadoo at gmail.com
max.wanadoo at gmail.com
Fri Sep 28 12:08:36 CDT 2007
Sorry Drew, What I meant was: Arthur said: Actually that was one of my first columns. It had this message box that said "The balance is not zero. The balance is 0.00". It all came about because if you put in a credit (minus) value first, the result would be minus zero. Simple enough to fix with ABS(), but until then I didn't realize that there were two values for zero. Is this going to happy when a Currency Type is used? Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Friday, September 28, 2007 5:40 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Friday (You Know) Currency Data Type (from the MSDN): Currency variables are stored as 64-bit (8-byte) numbers in an integer format, scaled by 10,000 to give a fixed-point number with 15 digits to the left of the decimal point and 4 digits to the right. This representation provides a range of -922,337,203,685,477.5808 to 922,337,203,685,477.5807 Note the last digits are 8 and 7 again. So the sign bit represents a number other then -0 when it is on alone. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of max.wanadoo at gmail.com Sent: Friday, September 28, 2007 11:32 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Friday (You Know) Drew, What about "Currency", which is what I am using in this program. That can have minus and plus(es)? MAx -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Friday, September 28, 2007 5:22 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Friday (You Know) VB/VBA shouldn't have this problem. A long Integer is 'signed', but there is no -0. Here's the def of a Long Integer from the MSDN: Long (long integer) variables are stored as signed 32-bit (4-byte) numbers ranging in value from -2,147,483,648 to 2,147,483,647. Note that the absolute value of the negative number is 1 more then the positive number? If it was -2,147,483,647 to 2,147,483,647, then there could be a negative zero. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of max.wanadoo at gmail.com Sent: Friday, September 28, 2007 11:06 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Friday (You Know) Wow! Is this a candidate for your subtle bugs or what? I never knew that and I bet not many other people did either. Thinking about it, I actually have this problem on our Daily Cash Book entry system - I will revisit it with this in mind. Gosh, I learno soooo much from this list. Max -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Friday, September 28, 2007 4:51 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Friday (You Know) Actually that was one of my first columns. It had this message box that said "The balance is not zero. The balance is 0.00". It all came about because if you put in a credit (minus) value first, the result would be minus zero. Simple enough to fix with ABS(), but until then I didn't realize that there were two values for zero. Arthur On 9/28/07, Drew Wutka <DWUTKA at marlow.com> wrote: > > How about one that misses a negative zero? (obviously not an issue in > VB or VBA) > > Drew > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI BusinessSensitve material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com