Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   long double literal (http://www.velocityreviews.com/forums/t596064-long-double-literal.html)

 Ioannis Vranos 03-04-2008 09:58 PM

long double literal

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

long double d= 543.4545L;

 Walter Roberson 03-04-2008 10:01 PM

Re: long double literal

In article <fqkgmf\$1plc\$1@ulysses.noc.ntua.gr>,
Ioannis Vranos <ivranos@nospam.no.spamfreemail.gr> 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

 Ioannis Vranos 03-04-2008 10:08 PM

Re: long double literal

Walter Roberson wrote:
> In article <fqkgmf\$1plc\$1@ulysses.noc.ntua.gr>,
> Ioannis Vranos <ivranos@nospam.no.spamfreemail.gr> 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?

 Walter Roberson 03-04-2008 10:33 PM

Re: long double literal

In article <fqkh8d\$1plc\$2@ulysses.noc.ntua.gr>,
Ioannis Vranos <ivranos@nospam.no.spamfreemail.gr> wrote:
>Walter Roberson wrote:
>> In article <fqkgmf\$1plc\$1@ulysses.noc.ntua.gr>,
>> Ioannis Vranos <ivranos@nospam.no.spamfreemail.gr> 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

 Ioannis Vranos 03-04-2008 10:34 PM

Re: long double literal

Walter Roberson wrote:
> In article <fqkh8d\$1plc\$2@ulysses.noc.ntua.gr>,
> Ioannis Vranos <ivranos@nospam.no.spamfreemail.gr> wrote:
>> Walter Roberson wrote:
>>> In article <fqkgmf\$1plc\$1@ulysses.noc.ntua.gr>,
>>> Ioannis Vranos <ivranos@nospam.no.spamfreemail.gr> 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

 Falcon Kirtaran 03-07-2008 03:51 AM

Re: long double literal

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

 Micah Cowan 03-07-2008 06:28 AM

Re: long double literal

Falcon Kirtaran <falconnews@iridiumlinux.org> 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/

 jaysome 03-07-2008 07:06 AM

Re: long double literal

On Fri, 07 Mar 2008 06:28:08 GMT, Micah Cowan <micah@cowan.name>
wrote:

>Falcon Kirtaran <falconnews@iridiumlinux.org> 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/

 santosh 03-07-2008 08:00 AM

OT - Re: long double literal

jaysome wrote:

<snip>

What a complete turnaround WRT your sig. You used to fervently tout
Vista, what happened?

 Richard Heathfield 03-07-2008 08:13 AM

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@