Pages: « 1 2 3 4 5 »
  Print  
Author Topic: Subject  (Read 11990 times)
Offline (Unknown gender) skarik
Reply #15 Posted on: July 27, 2009, 05:07:04 PM

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
Code: [Select]
struct a {} b;
b.a=0;
Do people actually have that happen?
Logged
~~
Offline (Male) RetroX
Reply #16 Posted on: July 27, 2009, 09:12:24 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
That's essentially the equivalent of doing:
Code: [Select]
int x;
x.int=0;
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) skarik
Reply #17 Posted on: July 28, 2009, 12:31:38 PM

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
Why?
Logged
~~
Offline (Male) RetroX
Reply #18 Posted on: July 28, 2009, 10:17:06 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I dunno; ask Josh.  He's seen things way crazier than I have or ever will.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #19 Posted on: July 29, 2009, 12:11:39 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
It's worse than int x; x.whatever;

In that code, you at least have four bytes to work with. This offers nothing; the structure has no member by that name, and it certainly can't be treated as an integer, so ENIGMA really has nothing to do with that but error.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) RetroX
Reply #20 Posted on: July 29, 2009, 08:11:41 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I still don't get why someone would say int x; x.int=0;
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Rusky
Reply #21 Posted on: July 29, 2009, 11:21:19 AM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Because they're stupid. You can't just ignore possible stuff just because nobody would do it, you have to give an error.
Logged
Offline (Male) RetroX
Reply #22 Posted on: July 29, 2009, 10:00:33 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Because they're stupid. You can't just ignore possible stuff just because nobody would do it, you have to give an error.
Even GM doesn't do that completely, and they'll have at least 9000 more dumb users than we ever will.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) score_under
Reply #23 Posted on: July 30, 2009, 08:18:03 AM

Member
Joined: Aug 2008
Posts: 308

View Profile
at least 9000

No no no, it's "at least 100" or "over 9000", but not a mix of both! You may as well say "Last thursday we can has at least 9000 moar n00bs".
Logged
Offline (Male) Rusky
Reply #24 Posted on: July 30, 2009, 10:39:00 AM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
How doesn't GM do it completely? If you do something that doesn't make sense, it errors. Saying x.var is a syntax error, saying x.player_obj is an unknown variable error.
Logged
Offline (Male) Josh @ Dreamland
Reply #25 Posted on: July 30, 2009, 11:07:13 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
And var xy; xy.a=0; will error "Undefined variable xy", even though you declared it. var x; errors that you can't redefine a builtin variable. Which is dumb. I may have to make EINGMA error if you say local int x; though.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Rusky
Reply #26 Posted on: July 30, 2009, 01:44:59 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
But xy is undefined. It's declared, but it has no value. Think of it in a dynamic typing sense, not a static one.
Logged
Offline (Male) notachair
Reply #27 Posted on: July 31, 2009, 02:33:45 AM

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299

View Profile
Logged
Offline (Male) Josh @ Dreamland
Reply #28 Posted on: July 31, 2009, 08:52:36 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
Rusky-
Yes...

a2h-
1/x?
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) score_under
Reply #29 Posted on: July 31, 2009, 11:56:40 AM

Member
Joined: Aug 2008
Posts: 308

View Profile
a2h-
1/x?
Yes.
Logged
Pages: « 1 2 3 4 5 »
  Print