LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Closed Thread
 
LinkBack Search this Thread
Old 01-17-2010, 05:10 PM   #181
MTK358
LQ 5k Club
 
Registered: Sep 2009
Distribution: Arch x86_64
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707

Maybe it at least compiles on the weird compilers he uses.
 
Old 01-17-2010, 08:56 PM   #182
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 859
Blog Entries: 31

Rep: Reputation: 144Reputation: 144
Quote:
Code:
test.c:4: warning: division by zero
Why is that a warning and not an error?? Seems to me that a division by zero is a guaranteed automatic runtime error. It should simply refuse to compile (maybe there's a flag in gcc you can set to make the errors more strict?).
 
Old 01-18-2010, 01:46 AM   #183
carbonfiber
Member
 
Registered: Sep 2009
Location: Sparta
Posts: 237

Rep: Reputation: 46
Code:
-Werror
 
Old 01-18-2010, 02:11 AM   #184
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 13.37
Posts: 430

Rep: Reputation: 56
I have never programmed with exceptions, but perhaps you are able to handle x/0 with an exception to avoid runtime error, and that's why they only make x/0 warning and not error. Besids, what if you do this with variables, then you wouldn't know what values they had, so a/b could be x/0 and the compiler would never know. Just my thoughts.
 
Old 01-18-2010, 04:11 AM   #185
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,477
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
Going to make some coffee.
 
Old 01-18-2010, 05:00 AM   #186
sycamorex
Senior Member
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 4,396
Blog Entries: 1

Rep: Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627Reputation: 627
Quote:
Originally Posted by MTK358 View Post
I wonder about "0 divided by 0"? I guess the answer would be any number?
Don't even think about it - only Chuck Norris can divide by 0.
 
Old 01-18-2010, 05:32 AM   #187
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 128Reputation: 128
Quote:
only Chuck Norris can divide by 0.
IF the 0 represents a bullet hole...

Actually, I don't know what is so difficult about division by 0. Whenever I bake a pie, I ask no-one to divide it into slices. As a rule, that leads to nothing, or to an untouched pie, depending on your viewpoint. After which I end up dividing it all by myself. Therefore: division by 0 results in a whole pie. Why on earth do they call it a com-pie-ler if it hasn't got that sort of insight?

Last edited by jay73; 01-18-2010 at 05:34 AM.
 
Old 01-18-2010, 05:38 AM   #188
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,477
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
That proves it.
0/0 = 1
Now to prove black is white.

Last edited by brianL; 01-18-2010 at 05:39 AM.
 
Old 01-18-2010, 05:38 AM   #189
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536
LOL @ Jay73

Mmm, good coffee!
 
Old 01-18-2010, 06:06 AM   #190
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 128Reputation: 128
OMG. I've just found a hairy cucumber in my fridge.
 
Old 01-18-2010, 06:19 AM   #191
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536
One time, many years ago, there was a lettuce in the back of a fridge. It was there for a very long time. By the time I decided to get rid of it, I was expecting the worst :/ because it LOOKED as though it was mushy, slimy and very disgusting.
Having prepared for the worst (I had gloves on or something like that) I reached for the lettuce to scoop it up and wipe up its remains, only to discover that the thing was playing a trick on me! It wasn't slimy and squishy at all, but instead, it was like a lifelike, 3-D model of its former self, only made entirely of "lettuce dust".
Coming into contact with it caused it to disintegrate into a little pile of dry lettuce, easily swept away.
A quick wash of its former location made it good as new.
 
Old 01-18-2010, 06:29 AM   #192
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,477
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
Mmmm, hairy cucumbers and lettuce dust...very interesting.
 
Old 01-18-2010, 06:34 AM   #193
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,477
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
jay73
Are you sure it's a hairy cucumber? It might be a giant caterpillar in suspended animation.
 
Old 01-18-2010, 06:49 AM   #194
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 128Reputation: 128
I don't know, with the long beard and all, I durst not look too closely. I'm beginning to fear it may be a taliban intern. Maybe someone told him "Don't blow up, kid, go cool down some place."
So who do I call now? Batman? Superman? They are Americans so I imagine that will mean a lot of collateral damage. I'd better run out and warn the neighbours they may feel the slightest of shocks as they get blown out of their homes.
Which makes me think how lucky Sasha has been. I'm sure Batman and Superman would have gone berserk if they had found out she was hiding a weapon of mass disintegration.

Last edited by jay73; 01-18-2010 at 06:55 AM.
 
Old 01-18-2010, 06:52 AM   #195
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 13.37 // Desktop: Slackware64 13.37 // Netbook: Slackware 13.37
Posts: 5,477
Blog Entries: 48

Rep: Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641Reputation: 641
It might be Osama bin Laden...bin hiding in your fridge all this time.

Last edited by brianL; 01-18-2010 at 06:53 AM.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 05:54 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration