Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > long double literal

Reply
Thread Tools

long double literal

 
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-04-2008
Do we designate a long double literal using an L after a floating point
literal, in the style:


long double d= 543.4545L;
 
Reply With Quote
 
 
 
 
Walter Roberson
Guest
Posts: n/a
 
      03-04-2008
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
 
Reply With Quote
 
 
 
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-04-2008
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?

 
Reply With Quote
 
Walter Roberson
Guest
Posts: n/a
 
      03-04-2008
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
 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      03-04-2008
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.
 
Reply With Quote
 
Falcon Kirtaran
Guest
Posts: n/a
 
      03-07-2008
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
 
Reply With Quote
 
Micah Cowan
Guest
Posts: n/a
 
      03-07-2008
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/
 
Reply With Quote
 
jaysome
Guest
Posts: n/a
 
      03-07-2008
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/
 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      03-07-2008
jaysome wrote:

<snip>

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

 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      03-07-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having compilation error: no match for call to ‘(const __gnu_cxx::hash<long long int>) (const long long int&)’ veryhotsausage C++ 1 07-04-2008 05:41 PM
unsigned long long int to long double Daniel Rudy C Programming 5 09-20-2005 02:37 AM
cannot convert parameter from 'double (double)' to 'double (__cdecl *)(double)' error Sydex C++ 12 02-17-2005 06:30 PM
What's wrong with rpc-literal? Why use doc-literal? Anonieko Ramos ASP .Net Web Services 0 09-27-2004 09:06 AM
Cast from (long double*) to (const double*) ferran C++ 9 04-12-2004 05:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57