long double literal

Discussion in 'C Programming' started by Ioannis Vranos, Mar 4, 2008.

  1. Do we designate a long double literal using an L after a floating point
    literal, in the style:


    long double d= 543.4545L;
     
    Ioannis Vranos, Mar 4, 2008
    #1
    1. Advertising

  2. In article <fqkgmf$1plc$>,
    Ioannis Vranos <> wrote:
    >Do we designate a long double literal using an L after a floating point
    >literal, in the style:


    >long double d= 543.4545L;


    Yes, L or l (lower-case L) can be used.

    --
    "The shallow murmur, but the deep are dumb." -- Sir Walter Raleigh
     
    Walter Roberson, Mar 4, 2008
    #2
    1. Advertising

  3. Walter Roberson wrote:
    > In article <fqkgmf$1plc$>,
    > Ioannis Vranos <> wrote:
    >> Do we designate a long double literal using an L after a floating point
    >> literal, in the style:

    >
    >> long double d= 543.4545L;

    >
    > Yes, L or l (lower-case L) can be used.


    Both apply to C90/C95?
     
    Ioannis Vranos, Mar 4, 2008
    #3
  4. In article <fqkh8d$1plc$>,
    Ioannis Vranos <> wrote:
    >Walter Roberson wrote:
    >> In article <fqkgmf$1plc$>,
    >> Ioannis Vranos <> wrote:
    >>> Do we designate a long double literal using an L after a floating point
    >>> literal, in the style:

    >>
    >>> long double d= 543.4545L;


    >> Yes, L or l (lower-case L) can be used.


    >Both apply to C90/C95?


    Unless it got revoked in C95 ;-) I pulled the information from C89.


    --
    "Beware of bugs in the above code; I have only proved it correct,
    not tried it." -- Donald Knuth
     
    Walter Roberson, Mar 4, 2008
    #4
  5. Walter Roberson wrote:
    > In article <fqkh8d$1plc$>,
    > Ioannis Vranos <> wrote:
    >> Walter Roberson wrote:
    >>> In article <fqkgmf$1plc$>,
    >>> Ioannis Vranos <> wrote:
    >>>> Do we designate a long double literal using an L after a floating point
    >>>> literal, in the style:
    >>>> long double d= 543.4545L;

    >
    >>> Yes, L or l (lower-case L) can be used.

    >
    >> Both apply to C90/C95?

    >
    > Unless it got revoked in C95 ;-) I pulled the information from C89.


    OK, thanks. AFAIK, C95 didn't revoke anything, bug fixes and 3 new
    standard header files in summary.
     
    Ioannis Vranos, Mar 4, 2008
    #5
  6. Ioannis Vranos wrote:
    > Do we designate a long double literal using an L after a floating point
    > literal, in the style:
    >
    >
    > long double d= 543.4545L;


    I have used a lowercase l for this.

    --
    --Falcon Kirtaran
     
    Falcon Kirtaran, Mar 7, 2008
    #6
  7. Ioannis Vranos

    Micah Cowan Guest

    Falcon Kirtaran <> writes:

    > Ioannis Vranos wrote:
    >> Do we designate a long double literal using an L after a floating
    >> point literal, in the style:
    >>
    >>
    >> long double d= 543.4545L;

    >
    > I have used a lowercase l for this.


    That's not a great idea, given that l and 1 look very very similar in
    many fonts commonly used for viewing program sources.

    --
    Micah J. Cowan
    Programmer, musician, typesetting enthusiast, gamer...
    http://micah.cowan.name/
     
    Micah Cowan, Mar 7, 2008
    #7
  8. Ioannis Vranos

    jaysome Guest

    On Fri, 07 Mar 2008 06:28:08 GMT, Micah Cowan <>
    wrote:

    >Falcon Kirtaran <> writes:
    >
    >> Ioannis Vranos wrote:
    >>> Do we designate a long double literal using an L after a floating
    >>> point literal, in the style:
    >>>
    >>>
    >>> long double d= 543.4545L;

    >>
    >> I have used a lowercase l for this.

    >
    >That's not a great idea, given that l and 1 look very very similar in
    >many fonts commonly used for viewing program sources.


    Others agree with you (including me).

    http://www.gimpel.com/html/oldbugs/bug620.htm

    Best regards
    --
    jay

    A free OS that supports one of the best (free) C compilers available:
    http://www.ubuntu.com/
     
    jaysome, Mar 7, 2008
    #8
  9. Ioannis Vranos

    santosh Guest

    OT - Re: long double literal

    jaysome wrote:

    <snip>

    What a complete turnaround WRT your sig. You used to fervently tout
    Vista, what happened?
     
    santosh, Mar 7, 2008
    #9
  10. Re: OT - Re: long double literal

    santosh said:

    > jaysome wrote:
    >
    > <snip>
    >
    > What a complete turnaround WRT your sig. You used to fervently tout
    > Vista, what happened?


    Presumably, Vista happened.

    --
    Richard Heathfield <http://www.cpax.org.uk>
    Email: -http://www. +rjh@
    Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
    "Usenet is a strange place" - dmr 29 July 1999
     
    Richard Heathfield, Mar 7, 2008
    #10
  11. Ioannis Vranos

    Randy Howard Guest

    Re: OT - Re: long double literal

    On Fri, 7 Mar 2008 02:13:28 -0600, Richard Heathfield wrote
    (in article <>):

    > santosh said:
    >
    >> jaysome wrote:
    >>
    >> <snip>
    >>
    >> What a complete turnaround WRT your sig. You used to fervently tout
    >> Vista, what happened?

    >
    > Presumably, Vista happened.


    Yeah, but to go to Ubuntu, it must have caused brain damage when it
    did.


    --
    Randy Howard (2reply remove FOOBAR)
    "The power of accurate observation is called cynicism by those
    who have not got it." - George Bernard Shaw
     
    Randy Howard, Mar 7, 2008
    #11
  12. Ioannis Vranos

    CBFalconer Guest

    Re: OT - Re: long double literal

    Randy Howard wrote:
    > Richard Heathfield wrote
    >> santosh said:
    >>
    >>> <snip>
    >>>
    >>> What a complete turnaround WRT your sig. You used to fervently
    >>> tout Vista, what happened?

    >>
    >> Presumably, Vista happened.

    >
    > Yeah, but to go to Ubuntu, it must have caused brain damage when
    > it did.


    Well, that is one of the known prime effects of Vista. It is
    simply the culmination of Microsoft efforts so far.

    --
    [mail]: Chuck F (cbfalconer at maineline dot net)
    [page]: <http://cbfalconer.home.att.net>
    Try the download section.



    --
    Posted via a free Usenet account from http://www.teranews.com
     
    CBFalconer, Mar 7, 2008
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ferran
    Replies:
    9
    Views:
    3,039
    Kevin Goodsell
    Apr 12, 2004
  2. JKop
    Replies:
    4
    Views:
    16,527
  3. Sydex
    Replies:
    12
    Views:
    6,507
    Victor Bazarov
    Feb 17, 2005
  4. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,197
    Peter Shaggy Haywood
    Sep 20, 2005
  5. Anonieko Ramos

    What's wrong with rpc-literal? Why use doc-literal?

    Anonieko Ramos, Sep 27, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    380
    Anonieko Ramos
    Sep 27, 2004
Loading...

Share This Page