As an aside I would use a local variable so command would look like this c_real($MyNumber_R) $MyNumber_R:=5000000.0 $real:=2*(MAXLONG-$MyNumber_R)
I do this so that 4D does not reset results based upon what it thinks it should do I think it will work even without the .0 Regards Chuck ------------------------------------------------------------------------------------------------ Chuck Miller Voice: (617) 739-0306 Informed Solutions, Inc. Fax: (617) 232-1064 mailto:cjmiller<AT SIGN>informed-solutions.com Brookline, MA 02446 USA Registered 4D Developer Providers of 4D and Sybase connectivity http://www.informed-solutions.com ------------------------------------------------------------------------------------------------ This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission, you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. > On Feb 22, 2018, at 12:53 PM, Timothy Penner via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I think that using the MAXLONG constant is causing the value to be treated as > a longint. > $Real := 2 * (MAXLONG - 5000000) > > If you replace the MAXLONG constant with a value you get the correct result: > $Real := 2 * (2147483647 - 5000000) > > Interestingly, you can keep using the MAXLONG constant if you do something > like this: > $Real := 2 * (MAXLONG - 5000000.1) ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************