[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] babel C, C++, D enhancement
From: |
Thierry Banel |
Subject: |
Re: [O] babel C, C++, D enhancement |
Date: |
Mon, 16 Jun 2014 22:49:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
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 écrit :
> 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=9876543210 .0
>> printf ("%g", large);
>> #+END_SRC
> That will lose precision, so it may not be the right thing either.
>
>
> Regards,
> Achim.
- [O] babel C, C++, D enhancement, (continued)
- [O] babel C, C++, D enhancement, Thierry Banel, 2014/06/01
- Re: [O] babel C, C++, D enhancement, Eric Schulte, 2014/06/06
- Re: [O] babel C, C++, D enhancement, Thierry Banel, 2014/06/07
- Re: [O] babel C, C++, D enhancement, Thierry Banel, 2014/06/08
- Re: [O] babel C, C++, D enhancement, Eric Schulte, 2014/06/08
- Re: [O] babel C, C++, D enhancement, Thierry Banel, 2014/06/09
- Re: [O] babel C, C++, D enhancement, Achim Gratz, 2014/06/13
- Re: [O] babel C, C++, D enhancement, Eric Schulte, 2014/06/13
- Re: [O] babel C, C++, D enhancement, Thierry Banel, 2014/06/13
- Re: [O] babel C, C++, D enhancement, Achim Gratz, 2014/06/16
- Re: [O] babel C, C++, D enhancement,
Thierry Banel <=
- Re: [O] babel C, C++, D enhancement, Thomas S. Dye, 2014/06/16
- Re: [O] babel C, C++, D enhancement, Nick Dokos, 2014/06/16
- Re: [O] babel C, C++, D enhancement, Achim Gratz, 2014/06/17
- Re: [O] babel C, C++, D enhancement, Thierry Banel, 2014/06/17
- Re: [O] babel C, C++, D enhancement, Bastien, 2014/06/13
- Re: [O] conforming commit messages Was: babel C, C++, D enhancement, Eric Schulte, 2014/06/13
- Re: [O] babel C, C++, D enhancement, Eric Abrahamsen, 2014/06/13
- Re: [O] Patch for testing `org-open-at-point', Achim Gratz, 2014/06/02
- Re: [O] Patch for testing `org-open-at-point', Bastien, 2014/06/03