From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: babel C, C++, D enhancement Date: Mon, 16 Jun 2014 11:14:35 -1000 Message-ID: References: <878urc0zmw.fsf@bzg.ath.cx> <874n1ryeq1.fsf@bzg.ath.cx> <87y4xgxu74.fsf@Rainer.invalid> <87r438uycj.fsf@bzg.ath.cx> <538BA215.2050305@free.fr> <877g4uezak.fsf@gmail.com> <5394C55B.7010906@free.fr> <87tx7vq955.fsf@gmail.com> <87ha3p8fq9.fsf@Rainer.invalid> <539B762F.90406@free.fr> <878uowpv4b.fsf@Rainer.invalid> <539F5842.2060209@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WweFZ-0006LH-Vw for emacs-orgmode@gnu.org; Mon, 16 Jun 2014 17:15:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WweEq-0002CS-6F for emacs-orgmode@gnu.org; Mon, 16 Jun 2014 17:15:33 -0400 Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]:41156) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1WweEp-00028E-Rz for emacs-orgmode@gnu.org; Mon, 16 Jun 2014 17:14:48 -0400 In-Reply-To: <539F5842.2060209@free.fr> (Thierry Banel's message of "Mon, 16 Jun 2014 22:49:06 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thierry Banel Cc: emacs-orgmode@gnu.org Aloha Thierry, How about a user-customizable variable with a default value of 2147483647? All the best, Tom Thierry Banel writes: > Hi Achim. > > You are right, INT_MAX is the C++ constant to compare to. > It is defined in limits.h > > I'm not sure I want to locate limits.h (where is it ? are there several > versions ?), > and parse it, all from within Emacs-lisp... > And this will have to be done for all languages (Python, Perl, Java, and > so on), > not just C++. > > Or we could assume that INT_MAX is always 2147483647. > (Which of course is not true). > > Not so easy... > > Regards > Thierry > > Le 16/06/2014 20:28, Achim Gratz a =C3=A9crit : >> Thierry Banel writes: >>> So Babel C++ may cause problem for large integers. >>> I am not sure how we can fix this in any case. >> You'd need to know INT_MAX and give an error for larger values or use an >> integral type that is large enough to handle Emacs' integer (which would >> most likely be necessary for any Emacs that uses wide integer). >> >>> In the meantime, we can force large values to be declared as doubles by >>> adding dot zero >>> like this: >>> >>> #+BEGIN_SRC C++ :var large=3D9876543210 .0 >>> printf ("%g", large); >>> #+END_SRC >> That will lose precision, so it may not be the right thing either. >> >> >> Regards, >> Achim. > > > --=20 Thomas S. Dye http://www.tsdye.com