[Tut] How to make a paradox on your computer

FireGrey

Undercover Admin
OP
Member
Joined
Apr 13, 2010
Messages
3,921
Trophies
1
Website
www.youtube.com
XP
1,281
Country
if variable = true {
variable = false
}
if variable = false {
variable = true
}

Try it, only a 20% chance of your computer exploding, or warping to another time.

This is what has come of EOF posts... :ninja:
 

Veho

The man who cried "Ni".
Former Staff
Joined
Apr 4, 2006
Messages
11,347
Trophies
3
Age
42
Location
Zagreb
XP
39,834
Country
Croatia
Does the "X = Y" line verify the truth of the statement, or assign the value Y to X? Either way, there's no paradox.
 
  • Like
Reactions: 1 person

Veho

The man who cried "Ni".
Former Staff
Joined
Apr 4, 2006
Messages
11,347
Trophies
3
Age
42
Location
Zagreb
XP
39,834
Country
Croatia
still it'll only change true to false and false to true depending on the initial value.

It will either change the value of the variable several times regardless of the initial value, or do nothing. Depending on whether the "=" is equivalence or assigning value.
 
  • Like
Reactions: 1 person

nryn99

desu~
Member
Joined
Sep 29, 2010
Messages
2,927
Trophies
1
XP
829
Country
Philippines
how will it
still it'll only change true to false and false to true depending on the initial value.

It will either change the value of the variable several times regardless of the initial value, or do nothing. Depending on whether the "=" is equivalence or assigning value.
:unsure: so it'll do nothing, since the initial value is null. it has to be either true or false first.
 

Jamstruth

Secondary Feline Anthropomorph
Member
Joined
Apr 23, 2009
Messages
3,462
Trophies
0
Age
30
Location
North East Scotland
XP
700
Country
still it'll only change true to false and false to true depending on the initial value.

It will either change the value of the variable several times regardless of the initial value, or do nothing. Depending on whether the "=" is equivalence or assigning value.
Generally "=" is an assigning value and a check would be something like "==" (this is what it is in Java)

And yeah, this isn't an entire program, this is a code snippet and a poorly thought out joke. Should mention if you put any boolean through that code it comes out as true.
 

AlanJohn

くたばれ
Global Moderator
Joined
Jan 6, 2011
Messages
3,849
Trophies
2
Age
26
Location
Canada,New Jersey
Website
www.deenextreme.com
XP
8,173
Country
Ukraine
  • Like
Reactions: 1 person
D

Deleted-236924

Guest
how will it
still it'll only change true to false and false to true depending on the initial value.

It will either change the value of the variable several times regardless of the initial value, or do nothing. Depending on whether the "=" is equivalence or assigning value.
:unsure: so it'll do nothing, since the initial value is null. it has to be either true or false first.
:hrth:
 

sadak5

Well-Known Member
Member
Joined
Feb 27, 2007
Messages
421
Trophies
0
Age
40
Location
Mexico City
Website
Visit site
XP
169
Country
Mexico
still it'll only change true to false and false to true depending on the initial value.

It will either change the value of the variable several times regardless of the initial value, or do nothing. Depending on whether the "=" is equivalence or assigning value.
Generally "=" is an assigning value and a check would be something like "==" (this is what it is in Java)

And yeah, this isn't an entire program, this is a code snippet and a poorly thought out joke. Should mention if you put any boolean through that code it comes out as true.

"==" to validate is an standard usend n both Java and all the C-Floavored languages, but in others it means comparison depending of the other keywords (for example if a==b in C is If a=b Then in Visual Basic).

Once a friend did a program who tested the sound card in an old 486 PC using C, increasing 1db in each loop. After 5 minutes and the program hasn't finidhed, we had to cut the power or risk our ears to bleed.
 

AlanJohn

くたばれ
Global Moderator
Joined
Jan 6, 2011
Messages
3,849
Trophies
2
Age
26
Location
Canada,New Jersey
Website
www.deenextreme.com
XP
8,173
Country
Ukraine
WAIT WAIT, AFTER SPENDING MY TIME LEARNING C++11, O FINALLY UNDERSTOOD WHAT WAS WRONG!
Code:
#include 
main()
{
int x
int y
printf("Input x here, you dumbfuck \n");
scanf("%d", x);
printf("You've entered %d! Now input y \n", x);
scanf("%d", y);
pritnf("You've entered %d! \n", y);
if x > y {
x == y
}
else {
printf("IMPOSSIBLE \n");
what I just typed was complete bullshit, and if you fell for it that means you're a complete retard that shouldn't live on this planet.
 

Foxi4

Endless Trash
Global Moderator
Joined
Sep 13, 2009
Messages
30,818
Trophies
3
Location
Gaming Grotto
XP
29,789
Country
Poland
WAIT WAIT, AFTER SPENDING MY TIME LEARNING C++11, O FINALLY UNDERSTOOD WHAT WAS WRONG!
Code:
#include 
main()
{
int x
int y
printf("Input x here, you dumbfuck \n");
scanf("%d", x);
printf("You've entered %d! Now input y \n", x);
scanf("%d", y);
pritnf("You've entered %d! \n", y);
if x > y {
x == y
}
else {
printf("IMPOSSIBLE \n");
what I just typed was complete bullshit, and if you fell for it that means you're a complete retard that shouldn't live on this planet.
1. End your declarations with ;
2. getch() would probably be useful here, no? ;)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    LeoTCK @ LeoTCK: hmm