Welcome, Guest. Please login or register.

Author Topic: Easily amused  (Read 5185 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Easily amused
« on: December 12, 2003, 10:43:09 PM »
Quote

Speelgoedmannetje wrote:
Well duh, "¿" is ofcourse no valid integer value


Well, '¿' is a character literal in C (if you are using a supported character set), so it would be a valid integer. You can probably get away with

int a = '¿';

That actually makes the error ironic too :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Easily amused
« Reply #1 on: December 13, 2003, 02:09:31 AM »
Quote

Speelgoedmannetje wrote:
But you can't get away with it in decent programming languages


Define C++ as a 'not decent' language :-P

The same expression would be valid there too.
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show all replies
Re: Easily amused
« Reply #2 on: December 14, 2003, 06:24:03 PM »
Quote

KennyR wrote:
There's nothing decent about C++. It was developed for the single purpose of being a bane to the human race.


Love / Hate. Not many in the middle. I see where you stand on the issue :lol:
int p; // A