• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 02:08
CEST 08:08
KST 15:08
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Serral wins HomeStory Cup 296Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
BSL Season 22 Full Overview & Conclusion7BSL Season 22 Full Overview & Conclusion7Weekly Cups (June 29-July 5): Solar Doubles0MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon445.0.16 Hotfix (June 30) - Balance + Bug Fixes40
StarCraft 2
General
Serral wins HomeStory Cup 29 Serral wins Maestros of the Game 2 Reynor: GSL Loss Wasn't About Preparation Format 5.0.16 patch for SC2 goes live (8 worker start) What is your PC setup in 2026 for SCBW/SC2 ?
Tourneys
GSL CK #5 Race War WardiTV Summer Cup 2026 RSL Revival: Season 6 - Qualifiers and Main Event HomeStory Cup 29 Vespene Cup #1 — $300+ USD, July 10
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together Mutation # 532 Nuclear Family
Brood War
General
ASL22 General Discussion Pros Debate: Zerg Unfairly Nerfed? (ASL S22 map) BSL Season 22 Full Overview & Conclusion BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion
Tourneys
[ASL22] Wildcard Qualifier IPSL Spring 2026 Top 4! [Megathread] Daily Proleagues CSLAN 4 is Coming!
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Path of Exile Summer Games Done Quick 2026! Nintendo Switch Thread
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread TL Mafia Power Rank Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread UK Politics Mega-thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Movie Discussion! Anime Discussion Thread Series you have seen recently...
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Tennis[sport] Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Simple Questions Simple Answers FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard?
TL Community
The Automated Ban List
Blogs
Major Shifts in the Gaming I…
TrAiDoS
An Exploration of th…
waywardstrategy
Gauntlet SC2: A Retrospectiv…
Ctone23
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6942 users

TL++ [So much ++ its Meta]

Blogs > CecilSunkure
Post a Reply
Normal
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
Last Edited: 2013-06-28 07:05:05
June 28 2013 06:49 GMT
#1
++ is commonly pronounced as "plus plus".

Lets get down to business: the ++ operator in C and C++ is crazy. Here some rules off the top of my head:

+ Show Spoiler [rules] +
i represents a whole number
i++ represents post-increment
post increment has the following properties:
-increments the value i and returns a copy of i made before the increment
-generally creates unnecessary copies of things when used with builtin types
-Cannot be used on rvalues afaik

++i is pre-increment
Properties of pre-increment
-generally the preferred operator for increments
-most of the time has less side-effects than post-increment
-usually results in more readable code
-increments i and returns the incremented i value


The ++ operator is like an addon to the normal + operator. It's an extension like many other ++ things.

[image loading]
An example of a ++ thing that exist as an extension to another thing


Now enough of that. ++ is also used in the name of the language C++ as C++ was built by some dude named Bjarne Stroustrup. C++ can be thought of as mostly a big expansion set to C.

Okay computer sciency things are done.

There's a thingy called Notepad++ and acts as a replacement for Microsoft's shitty Notepad program that comes packaged with Windows. Notepad++ has a bunch of other features that really should have been in Notepad (like reading Linux newlines -.-).

[image loading]
See? ++ things exist.


LASTLY there's TL+. Sure, we all have seen TL+ and it's pretty cool to support TL. However there's also TL++. Clearly we can see that ++ is significant in the C and C++ language in multiples ways. Notepad++ is like an extension or replacement for Notepad.

So this begs the question... Could there be a TL++ expansion to TL+? Is this getting meta on you? Lets call TL++ TLMeta. All the ++.

In TLMeta there's lots of news about the news that goes in the TL+ forum. All the information and all the posts in TLMeta are about the stuff in TL+. How is this fun? Well the magic is that if someone posts in TLMeta about something, even if it isn't truly in TL+ then it will become true.

This is magic. TLMeta is not only about TL+ but it is the keeper of TL+. What happens in TLMeta comes to be.

How can we get TLMeta or get to TLMeta? It's like the 4th dimension. We can only mathematically or logically think about the 4th dimension but we can't really experience it or understand it in a very intuitive or natural way.

[image loading]
Warped time because TLMeta


It exists and it is happening. People are posting in TLMeta all the time, and these people are actually about the people in TL+. I know all this meta is getting a little crazy.

The point is, here's a logimagical proof that TLMeta exists for all you non-believers:

TL is a website
TL+ exists and we are in it
Therefor to keep the ball rolling
TLMeta exists and it is about we


It is the only way imo. u gotta skate

**
LeeARK
Profile Joined October 2010
509 Posts
June 28 2013 06:59 GMT
#2
I'm wondering if somebody spiked Cecil's drink... or if he has too much free time on his hands.
haduken
Profile Blog Joined April 2003
Australia8267 Posts
June 28 2013 07:55 GMT
#3
So.... why is C# called C Sharp... instead of C pound sign or C hash..
Rillanon.au
Klonere
Profile Blog Joined December 2010
Ireland4123 Posts
June 28 2013 07:59 GMT
#4
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..


i assume its because its creator preferred music of telephones or drugs
wozzot
Profile Joined July 2012
United States1227 Posts
June 28 2013 08:03 GMT
#5
Oh no, we've been discovered
(ノ´∀`*)ノ ♪ ♫ ヽ(´ー`)ノ ♪ ♫ (✌゚∀゚)☞ ♪ ♫ ヽ(´ー`)ノ ♫ ♫ (ノ´_ゝ`)ノ彡 ┻━┻
DeepElemBlues
Profile Blog Joined January 2011
United States5079 Posts
June 28 2013 08:03 GMT
#6
the +ception is strong in this blog, 5/5
no place i'd rather be than the satellite of love
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
June 28 2013 09:20 GMT
#7
On June 28 2013 16:59 Klonere wrote:
Show nested quote +
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..


i assume its because its creator preferred music of telephones or drugs

Indeed, C# is actually written C♯ by Microsoft on boxart etc, C# is used simply because the hash is easier to write on a keyboard.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
June 28 2013 10:20 GMT
#8
The # is actually just two overlapping + signs. So it's C[++ in a single character].
If you have a good reason to disagree with the above, please tell me. Thank you.
imallinson
Profile Blog Joined May 2011
United Kingdom3482 Posts
June 28 2013 10:25 GMT
#9
TL++ isn't far enough we need TL#.
Liquipedia
Grovbolle
Profile Blog Joined July 2011
Denmark3813 Posts
June 28 2013 10:27 GMT
#10
Yay, Bjarne Stoustrup was from my Uni. Aarhus, Aarhus, Aarhus!!!!!!
Lies, damned lies and statistics: http://aligulac.com
3FFA
Profile Blog Joined February 2010
United States3931 Posts
June 28 2013 11:13 GMT
#11
Cecil, due to time being warped, I do not know of this thing you call 'TL+' and thus I have no knowledge of how an expansion could ever be made. If you wouldn't mind going into more detail, I would be grateful.
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
Toboe
Profile Blog Joined February 2010
United States276 Posts
June 28 2013 11:23 GMT
#12
I wanted to gift you TL++ for this blog, but couldn't find the button. Then I realized you had already transcended to the level where you were already a part of TL++. well played
Immortals are your friend, you can tell by the way they waddle at you
uZr
Profile Joined April 2011
20 Posts
June 28 2013 11:26 GMT
#13
+ are everywhere! It's a conspiration ! These guys were well aware of it !
packrat386
Profile Blog Joined October 2011
United States5077 Posts
June 28 2013 11:32 GMT
#14
Yay C++, the only language that I'm pretty competent with (I guess I know a bit of Java). I have so much to learn
dreaming of a sunny day
Burrfoot
Profile Blog Joined July 2012
United States1176 Posts
June 28 2013 11:52 GMT
#15
I say TL switches things up and upgrades TL+ to +TL+ or started with TL. And incrementally went to TL.. TL... all the way past 9000.s
http://us.battle.net/d3/en/profile/Davlok-1847/career
Xivsa
Profile Joined April 2011
United States1009 Posts
Last Edited: 2013-06-28 12:12:50
June 28 2013 12:12 GMT
#16
What is reality but what's perceived? Life imitates art. Wait, I must have that wrong.
I don't know half of you half as well as I should like and I like less than half of you half as well as you deserve. - Bilbo
3FFA
Profile Blog Joined February 2010
United States3931 Posts
Last Edited: 2013-06-28 12:43:23
June 28 2013 12:24 GMT
#17
On June 28 2013 20:52 Burrfoot wrote:
I say TL switches things up and upgrades TL+ to +TL+ or started with TL. And incrementally went to TL.. TL... all the way past 9000.s

Ahh so do something like
    
BOOL newday; //is it a new day? Yes or no answers only.

//other code to define newday would most likely go here.

if(newday = YES) // if it is a new day...
{
double TLplus = 9000; //9000 TL+
for (int TL=1; TL < TLplus; TL++) //endless loop is endless
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //Say hi to R1CH
printf("/n you are now %i R1CH in TL",TL); //TL, new currency.
TLplus ++; //OVER 9000 TL+!
newday = NO; //not a new day anymore :(
return TL; //because why not?
}
}
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
BisuDagger
Profile Blog Joined October 2009
Bisutopia19368 Posts
June 28 2013 13:36 GMT
#18
On June 28 2013 21:24 3FFA wrote:
Show nested quote +
On June 28 2013 20:52 Burrfoot wrote:
I say TL switches things up and upgrades TL+ to +TL+ or started with TL. And incrementally went to TL.. TL... all the way past 9000.s

Ahh so do something like
    
BOOL newday; //is it a new day? Yes or no answers only.

//other code to define newday would most likely go here.

if(newday = YES) // if it is a new day...
{
double TLplus = 9000; //9000 TL+
for (int TL=1; TL < TLplus; TL++) //endless loop is endless
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //Say hi to R1CH
printf("/n you are now %i R1CH in TL",TL); //TL, new currency.
TLplus ++; //OVER 9000 TL+!
newday = NO; //not a new day anymore :(
return TL; //because why not?
}
}


//endless loop is endless

Your loop only runs once.
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
June 28 2013 13:55 GMT
#19
That indentation is genius.

Is that a MS troolean type? It should be obvious, but if YES resolves to true, the condition will always be true. Well, if operator= isn't overloaded in some way at least.
If you have a good reason to disagree with the above, please tell me. Thank you.
3FFA
Profile Blog Joined February 2010
United States3931 Posts
June 28 2013 13:58 GMT
#20
Does it go to the if statement first? I thought it went to the for statement first. >.>
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
DusTerr
Profile Blog Joined January 2011
2520 Posts
June 28 2013 14:22 GMT
#21
how does TLPRO fit in?
1nfamous
Profile Joined October 2009
107 Posts
June 28 2013 14:37 GMT
#22
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>


its the return statement that makes your loop only run once.
BisuDagger
Profile Blog Joined October 2009
Bisutopia19368 Posts
Last Edited: 2013-06-28 14:44:46
June 28 2013 14:44 GMT
#23
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once :(
//you return the value of Tl which is 1
}
}
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
micronesia
Profile Blog Joined July 2006
United States24782 Posts
June 28 2013 15:11 GMT
#24
I'm rusty...


i = 5;
return i++;



i = 5;
return ++i;


In which case will it return 5, and in which will it return 6?
ModeratorThere are animal crackers for people and there are people crackers for animals.
Cyx.
Profile Joined November 2010
Canada806 Posts
June 28 2013 15:19 GMT
#25
On June 29 2013 00:11 micronesia wrote:
I'm rusty...


i = 5;
return i++;



i = 5;
return ++i;


In which case will it return 5, and in which will it return 6?


5 for the first, 6 for the second.
3FFA
Profile Blog Joined February 2010
United States3931 Posts
June 28 2013 15:37 GMT
#26
On June 28 2013 23:44 BisuDagger wrote:
Show nested quote +
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once :(
//you return the value of Tl which is 1
}
}

See... this is why I got a ton of handwritten quizzes wrong in my programming class this past year >.> I overlook things that the compiler warns me about.
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
quirinus
Profile Blog Joined May 2007
Croatia2489 Posts
June 28 2013 15:47 GMT
#27
TL+ gift bait? xD
All candles lit within him, and there was purity. | First auto-promoted BW LP editor.
BisuDagger
Profile Blog Joined October 2009
Bisutopia19368 Posts
June 28 2013 16:21 GMT
#28
On June 29 2013 00:37 3FFA wrote:
Show nested quote +
On June 28 2013 23:44 BisuDagger wrote:
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once :(
//you return the value of Tl which is 1
}
}

See... this is why I got a ton of handwritten quizzes wrong in my programming class this past year >.> I overlook things that the compiler warns me about.

You and me both. When I went through school I bombed all those quizzes. But after all that schooling and practice and a year or so of industry work and you will have a hawks eye for code.
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
3FFA
Profile Blog Joined February 2010
United States3931 Posts
June 28 2013 16:50 GMT
#29
On June 29 2013 01:21 BisuDagger wrote:
Show nested quote +
On June 29 2013 00:37 3FFA wrote:
On June 28 2013 23:44 BisuDagger wrote:
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once :(
//you return the value of Tl which is 1
}
}

See... this is why I got a ton of handwritten quizzes wrong in my programming class this past year >.> I overlook things that the compiler warns me about.

You and me both. When I went through school I bombed all those quizzes. But after all that schooling and practice and a year or so of industry work and you will have a hawks eye for code.

Hehe. Trust me, I'm doing tons of practice in the years ahead. In fact, I'm experimenting with making a tile-based game app at this very moment.
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
June 28 2013 17:12 GMT
#30
I really prefer +=. In fact I actually had a stylistic guide in a class once that would not allow you to use the ++ operator. The autochecker for assignments would throw an error until you changed it.
DusTerr
Profile Blog Joined January 2011
2520 Posts
June 28 2013 17:27 GMT
#31
On June 29 2013 01:50 3FFA wrote:
Show nested quote +
On June 29 2013 01:21 BisuDagger wrote:
On June 29 2013 00:37 3FFA wrote:
On June 28 2013 23:44 BisuDagger wrote:
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once
//you return the value of Tl which is 1
}
}

See... this is why I got a ton of handwritten quizzes wrong in my programming class this past year >.> I overlook things that the compiler warns me about.

You and me both. When I went through school I bombed all those quizzes. But after all that schooling and practice and a year or so of industry work and you will have a hawks eye for code.

Hehe. Trust me, I'm doing tons of practice in the years ahead. In fact, I'm experimenting with making a tile-based game app at this very moment.

I think I learned more in this thread than I did in class... (why was there always some gsl/pl/gstl on when I'm in school?)
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2013-06-28 17:46:11
June 28 2013 17:44 GMT
#32
On June 29 2013 02:12 wherebugsgo wrote:
I really prefer +=. In fact I actually had a stylistic guide in a class once that would not allow you to use the ++ operator. The autochecker for assignments would throw an error until you changed it.

So now instead of

void func(int i) { }
int i = 42;
func(i++);

you always write

void func(int i) { }
int i = 42;
int t;
func((t = i, i += 1, t));

Yes, that's an assignment too, even though there is no = sign in the function call.

Granted, the sequence
vector<int> v(10, 0);
int i = 0;
v[i] = i++;
Can resolve to pretty much anything your compiler wants it to, but is that a reason to avoid ++?

My C++ got really rusty from all that C# lately, geez. Had to look up all of this to make sure I'm not making mistakes...
If you have a good reason to disagree with the above, please tell me. Thank you.
BisuDagger
Profile Blog Joined October 2009
Bisutopia19368 Posts
Last Edited: 2013-06-28 18:10:04
June 28 2013 18:09 GMT
#33
You're doing it wrong if you are using the '+' symbol at all.

#include <iostream>
using namespace std;
int add(int x, int y) {
int a, b;
do {
a = x & y;
b = x ^ y;
x = a << 1;
y = b;
}while(a);
return b;
}

int main()
{
cout << add(2,6);
system("pause");
return 0;
}
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
3FFA
Profile Blog Joined February 2010
United States3931 Posts
June 28 2013 18:25 GMT
#34
wait... what are you trying to do in this code? I got lost at the beginning and then the code just changed into so many different formats that I was like then and finally,
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
BisuDagger
Profile Blog Joined October 2009
Bisutopia19368 Posts
June 28 2013 18:29 GMT
#35
On June 29 2013 03:25 3FFA wrote:
wait... what are you trying to do in this code? I got lost at the beginning and then the code just changed into so many different formats that I was like then and finally,

Write it out on paper. These are bitwise operators. It means you manipulate the bits.Convert 2 and 6 in the binary format from decimal and then follow it along.
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
3FFA
Profile Blog Joined February 2010
United States3931 Posts
June 28 2013 18:31 GMT
#36
On June 29 2013 03:29 BisuDagger wrote:
Show nested quote +
On June 29 2013 03:25 3FFA wrote:
wait... what are you trying to do in this code? I got lost at the beginning and then the code just changed into so many different formats that I was like then and finally,

Write it out on paper. These are bitwise operators. It means you manipulate the bits.Convert 2 and 6 in the binary format from decimal and then follow it along.

Oh binary! I haven't worked with those for a whole year. That explains it. Thanks, I think I understand it now
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
June 28 2013 19:54 GMT
#37
I'm going to have to fix this.

int add(int x, int y) ??<
int a, b;
do <%
a = x bitand y;
b = x ??' y;
x = a << 1;
y = b;
??> while(a);
return b;
%>


And while we're at it, we should create a wrapper class for int, maybe called inT, and only use that instead of the built in type. Then we overload the +, += and ++ operators for great success.
If you have a good reason to disagree with the above, please tell me. Thank you.
Bobbias
Profile Blog Joined March 2008
Canada1373 Posts
June 28 2013 19:56 GMT
#38
On June 29 2013 01:50 3FFA wrote:
Show nested quote +
On June 29 2013 01:21 BisuDagger wrote:
On June 29 2013 00:37 3FFA wrote:
On June 28 2013 23:44 BisuDagger wrote:
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once
//you return the value of Tl which is 1
}
}

See... this is why I got a ton of handwritten quizzes wrong in my programming class this past year >.> I overlook things that the compiler warns me about.

You and me both. When I went through school I bombed all those quizzes. But after all that schooling and practice and a year or so of industry work and you will have a hawks eye for code.

Hehe. Trust me, I'm doing tons of practice in the years ahead. In fact, I'm experimenting with making a tile-based game app at this very moment.


Incidentally, I'm also working on a tile based game at this very moment. Using LÖVE, which is nice, because Lua is a pretty cool language and I don't have to write all the boilerplate code or all the low level opengl stuff just to do 2d rendering. Just found someone's component based entity system and I'm working on building off that.
3FFA
Profile Blog Joined February 2010
United States3931 Posts
June 28 2013 20:37 GMT
#39
On June 29 2013 04:56 Bobbias wrote:
Show nested quote +
On June 29 2013 01:50 3FFA wrote:
On June 29 2013 01:21 BisuDagger wrote:
On June 29 2013 00:37 3FFA wrote:
On June 28 2013 23:44 BisuDagger wrote:
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once
//you return the value of Tl which is 1
}
}

See... this is why I got a ton of handwritten quizzes wrong in my programming class this past year >.> I overlook things that the compiler warns me about.

You and me both. When I went through school I bombed all those quizzes. But after all that schooling and practice and a year or so of industry work and you will have a hawks eye for code.

Hehe. Trust me, I'm doing tons of practice in the years ahead. In fact, I'm experimenting with making a tile-based game app at this very moment.


Incidentally, I'm also working on a tile based game at this very moment. Using LÖVE, which is nice, because Lua is a pretty cool language and I don't have to write all the boilerplate code or all the low level opengl stuff just to do 2d rendering. Just found someone's component based entity system and I'm working on building off that.

Huh. I don't believe I've heard of Lua before. I may check it out sometime in the distant future.
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
BisuDagger
Profile Blog Joined October 2009
Bisutopia19368 Posts
June 28 2013 21:07 GMT
#40
On June 29 2013 05:37 3FFA wrote:
Show nested quote +
On June 29 2013 04:56 Bobbias wrote:
On June 29 2013 01:50 3FFA wrote:
On June 29 2013 01:21 BisuDagger wrote:
On June 29 2013 00:37 3FFA wrote:
On June 28 2013 23:44 BisuDagger wrote:
On June 28 2013 22:58 3FFA wrote:
Does it go to the if statement first? I thought it went to the for statement first. >.>

    
BOOL newday = false; //Initialize it to avoid warnings
//YES or NO answers only. I fixed the caps because C++ is character specific

if(newday = YES) //newday has been assigned the value of YES, it will always evaluate to true
{
double TLplus = 9000; //TLPlus is now worth 9000
for (double TL=1; TL < TLplus; TL++) //Make TL a double otherwise you are comparing an int to a double
//loop will attemp to run until TL >= TLplus
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"; //reads the string
printf("/n you are now %i R1CH in TL",TL); //starts a new line and then reads the string,
//using %d allows for morepercision
TLplus ++; //OVER 9000 TL+! Increments TLPlus by 1
newday = NO; //newday is assigned to the value of no
return TL; //you have just exited your code so your for loop did not run over 9000 times. Only Once
//you return the value of Tl which is 1
}
}

See... this is why I got a ton of handwritten quizzes wrong in my programming class this past year >.> I overlook things that the compiler warns me about.

You and me both. When I went through school I bombed all those quizzes. But after all that schooling and practice and a year or so of industry work and you will have a hawks eye for code.

Hehe. Trust me, I'm doing tons of practice in the years ahead. In fact, I'm experimenting with making a tile-based game app at this very moment.


Incidentally, I'm also working on a tile based game at this very moment. Using LÖVE, which is nice, because Lua is a pretty cool language and I don't have to write all the boilerplate code or all the low level opengl stuff just to do 2d rendering. Just found someone's component based entity system and I'm working on building off that.

Huh. I don't believe I've heard of Lua before. I may check it out sometime in the distant future.


Lua is the scripting language blizzard uses to create the UI in WoW. Its one of the most popular along with python. They are really useful tl know.
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
Meta
Profile Blog Joined June 2003
United States6228 Posts
June 28 2013 21:43 GMT
#41
I'm in favor of TLMeta.
good vibes only
Jacmert
Profile Blog Joined October 2011
Canada1709 Posts
June 28 2013 21:44 GMT
#42
On June 28 2013 22:36 BisuDagger wrote:
Show nested quote +
On June 28 2013 21:24 3FFA wrote:
On June 28 2013 20:52 Burrfoot wrote:
I say TL switches things up and upgrades TL+ to +TL+ or started with TL. And incrementally went to TL.. TL... all the way past 9000.s

Ahh so do something like
    
BOOL newday; //is it a new day? Yes or no answers only.

//other code to define newday would most likely go here.

if(newday = YES) // if it is a new day...
{
double TLplus = 9000; //9000 TL+
for (int TL=1; TL < TLplus; TL++) //endless loop is endless
{
printf("Sup Oh Great And All Powerful Master Wizard R1CH"); //Say hi to R1CH
printf("/n you are now %i R1CH in TL",TL); //TL, new currency.
TLplus ++; //OVER 9000 TL+!
newday = NO; //not a new day anymore :(
return TL; //because why not?
}
}


Show nested quote +
//endless loop is endless

Your loop only runs once.

Ha ha! Good, I'm not crazy. I don't usually code in C++ (I work with a C++ like language), but I was like, "doesn't return break out of the loop?"

And I've NEVER heard/known about i++ returning any value, nor the difference between i++ and ++i. Good to know. Thanks!
Plat Support Main #believe
mizU
Profile Blog Joined April 2010
United States12125 Posts
June 28 2013 22:09 GMT
#43
what da fuk is going on
if happy ever afters did exist <3 @watamizu_
Shana
Profile Blog Joined July 2009
Indonesia1814 Posts
June 28 2013 23:48 GMT
#44
So there will be TL++ soon?
Believing in what lies ahead. | That which we call a rose, by any other name would smell as sweet.
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
Last Edited: 2013-06-29 00:59:41
June 29 2013 00:58 GMT
#45
On June 29 2013 02:44 spinesheath wrote:
Show nested quote +
On June 29 2013 02:12 wherebugsgo wrote:
I really prefer +=. In fact I actually had a stylistic guide in a class once that would not allow you to use the ++ operator. The autochecker for assignments would throw an error until you changed it.

So now instead of

void func(int i) { }
int i = 42;
func(i++);

you always write

void func(int i) { }
int i = 42;
int t;
func((t = i, i += 1, t));

Yes, that's an assignment too, even though there is no = sign in the function call.

Granted, the sequence
vector<int> v(10, 0);
int i = 0;
v[i] = i++;
Can resolve to pretty much anything your compiler wants it to, but is that a reason to avoid ++?

My C++ got really rusty from all that C# lately, geez. Had to look up all of this to make sure I'm not making mistakes...


Actually, I'm almost 100% sure this is exactly why some programmers suggest avoiding ++ and --, because when you use them inline with other things, it tends to confuse people who did not write the code themselves. The professor I had that required += instead of ++ was not the only one who suggested this, though he was the most vocal about it. A few that I've had have said that increment and decrement operators should only be used by themselves on a single line, i.e.


i++;
a[i] = x;


instead of


a[++i] = x;


The fact that you had to look up documentation to see if you were doing everything correctly is another indication that perhaps you should consider simplifying your style, regardless of whether you've spent time programming in C#. Good programming practices lead to simple and readable code. I don't think what you suggested is very simple. Even if it takes more time to write it initially, clean and simple code is much easier and less painful to maintain.

For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.

Then again, maybe I am significantly biased, since the first three languages I learned to program in were Fortran, Scheme, and Python, none of which use the ++ operator. It was only after I used them for 2 years that I moved onto Java and C.
rabidch
Profile Joined January 2010
United States20289 Posts
June 29 2013 01:26 GMT
#46
On June 28 2013 19:20 spinesheath wrote:
The # is actually just two overlapping + signs. So it's C[++ in a single character].

or it could be 4 smaller +s
LiquidDota StaffOnly a true king can play the King.
aNGryaRchon
Profile Joined August 2012
United States438 Posts
June 29 2013 02:39 GMT
#47
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

Good question
Power overwhelming!!!
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2013-06-29 06:02:12
June 29 2013 06:00 GMT
#48
On June 29 2013 09:58 wherebugsgo wrote:
Show nested quote +
On June 29 2013 02:44 spinesheath wrote:
On June 29 2013 02:12 wherebugsgo wrote:
I really prefer +=. In fact I actually had a stylistic guide in a class once that would not allow you to use the ++ operator. The autochecker for assignments would throw an error until you changed it.

So now instead of

void func(int i) { }
int i = 42;
func(i++);

you always write

void func(int i) { }
int i = 42;
int t;
func((t = i, i += 1, t));

Yes, that's an assignment too, even though there is no = sign in the function call.

Granted, the sequence
vector<int> v(10, 0);
int i = 0;
v[i] = i++;
Can resolve to pretty much anything your compiler wants it to, but is that a reason to avoid ++?

My C++ got really rusty from all that C# lately, geez. Had to look up all of this to make sure I'm not making mistakes...


Actually, I'm almost 100% sure this is exactly why some programmers suggest avoiding ++ and --, because when you use them inline with other things, it tends to confuse people who did not write the code themselves. The professor I had that required += instead of ++ was not the only one who suggested this, though he was the most vocal about it. A few that I've had have said that increment and decrement operators should only be used by themselves on a single line, i.e.


i++;
a[i] = x;


instead of


a[++i] = x;


The fact that you had to look up documentation to see if you were doing everything correctly is another indication that perhaps you should consider simplifying your style, regardless of whether you've spent time programming in C#. Good programming practices lead to simple and readable code. I don't think what you suggested is very simple. Even if it takes more time to write it initially, clean and simple code is much easier and less painful to maintain.

For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.

Then again, maybe I am significantly biased, since the first three languages I learned to program in were Fortran, Scheme, and Python, none of which use the ++ operator. It was only after I used them for 2 years that I moved onto Java and C.

I had to look this stuff up because things like the comma operator are pretty damn exotic and I would never use them in real code unless I had a very specific reason to use it. Also to make sure the example of undefined behavior is actually undefined behavior.
Increment operators are generally fine if you only have a single occurence of the incremented variable in the whole statement and don't have any side effects on the variable. Sure, it means you need to be careful, but in fact compilers should be able to warn you about these things nowadays and I wouldn't give up proper ++ usage (which really is just in cases where it is clear what it does) where appropriate just for a little false security. You're not allowed to be any less careful just because you avoid ++, anyways.
If you have a good reason to disagree with the above, please tell me. Thank you.
Mobius_1
Profile Blog Joined April 2011
United Kingdom2763 Posts
June 29 2013 08:23 GMT
#49
doubleplus? Are we at war with Eastasia or Eurasia?
Starleague Forever. RIP KT Violet~
docvoc
Profile Blog Joined July 2011
United States5491 Posts
June 29 2013 15:38 GMT
#50
On June 28 2013 15:49 CecilSunkure wrote:
u gotta skate

The moral of the story.
User was warned for too many mimes.
Scorpion77
Profile Blog Joined January 2013
98 Posts
June 30 2013 17:41 GMT
#51
idk, this sounds like it would disturb the fabric of the metagame
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2013-06-30 22:29:28
June 30 2013 22:27 GMT
#52
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

=.=

-removed comment-
There is no one like you in the universe.
MaGariShun
Profile Joined May 2010
Austria305 Posts
July 01 2013 15:28 GMT
#53
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

Because calling it 'Java' would have been to obvious of a ripoff
XCetron
Profile Joined November 2006
5226 Posts
July 01 2013 16:15 GMT
#54
On June 28 2013 16:55 haduken wrote:
So.... why is C# called C Sharp... instead of C pound sign or C hash..

[image loading]
Rayeth
Profile Blog Joined April 2010
United States883 Posts
July 01 2013 21:07 GMT
#55
On June 29 2013 09:58 wherebugsgo wrote:


For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.


I can show off my knowledge of old languages, whee!


i = i++ + ++i;

This is straight up undefined behavior by the C standard. I don't know about C++ or C# (as I don't use them), but the C standard says this will lead to undefined behavior. You are using the ++ operator in such a way as to make its use dependant on what the compiler chooses to do first. It is equally undefined to say:

u = u++;


Now something will happen, but what you get is dependent on what system, what compiler and who knows how many other variables. The correct way to write the above would simply be u++;

The technical reason for these being incorrect is that you are modifying the stored value more than once between sequence points. As for what a sequence point is refer to the Wikipedia article as it is much clearer than I could ever be. The end result here is that you are right. No one should ever use expressions like that. They are sometimes used in classrooms to demonstrate bad code for a reason!

I will disagree with you about the pointers though. Yes bad code can be created using silly means, but a competent coder should not fear to use pointers. They are really useful! Don't shy away from such a powerful tool because they can be confusing, just make sure you are not the one writing the bad code. =)
The Innocent shall suffer... big time.
Targe
Profile Blog Joined February 2012
United Kingdom14103 Posts
July 01 2013 22:26 GMT
#56
u gotta skate

+ Show Spoiler +
this thread hurts my head
11/5/14 CATACLYSM | The South West's worst Falco main
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
July 02 2013 01:00 GMT
#57
On July 02 2013 07:26 Targe wrote:
u gotta skate

hahaha, I wonder if anyone got the baller reference in there too
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
Last Edited: 2013-07-06 01:17:43
July 06 2013 01:13 GMT
#58
On July 02 2013 06:07 Rayeth wrote:
Show nested quote +
On June 29 2013 09:58 wherebugsgo wrote:


For example, what does this mean?


i = i++ + ++i;


Sometimes with pointer arithmetic in C the increment operators can become really confusing too.

The point is not that you CAN do these things. Sure, you can do them. It doesn't mean you should. I'm personally of the belief that code should not be a labor to read or understand. It's a pain in the ass to debug someone else's code when it's written poorly and not commented.


I can show off my knowledge of old languages, whee!


i = i++ + ++i;

This is straight up undefined behavior by the C standard. I don't know about C++ or C# (as I don't use them), but the C standard says this will lead to undefined behavior. You are using the ++ operator in such a way as to make its use dependant on what the compiler chooses to do first. It is equally undefined to say:

u = u++;


Now something will happen, but what you get is dependent on what system, what compiler and who knows how many other variables. The correct way to write the above would simply be u++;

The technical reason for these being incorrect is that you are modifying the stored value more than once between sequence points. As for what a sequence point is refer to the Wikipedia article as it is much clearer than I could ever be. The end result here is that you are right. No one should ever use expressions like that. They are sometimes used in classrooms to demonstrate bad code for a reason!

I will disagree with you about the pointers though. Yes bad code can be created using silly means, but a competent coder should not fear to use pointers. They are really useful! Don't shy away from such a powerful tool because they can be confusing, just make sure you are not the one writing the bad code. =)


I never once said that a good programmer should not use pointers. I use pointers all the time, I just don't necessarily increment them using ++.

edit: btw, I used those examples because I've actually seen them in codebases.

yep, that's right. I have seen real code written by real people that looks that confusing.
Normal
Please log in or register to reply.
Live Events Refresh
Next event in 4h 52m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft748
oGsTOP 207
StarCraft: Brood War
Rain 6040
GuemChi 2700
Tasteless 284
ZergMaN 28
NaDa 25
Bale 18
Noble 13
Icarus 9
IntoTheRainbow 8
League of Legends
JimRising 687
Counter-Strike
summit1g6726
Other Games
C9.Mang0314
NeuroSwarm133
Nina47
Organizations
Other Games
gamesdonequick2379
BasetradeTV206
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH326
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush1421
• Stunt565
Upcoming Events
WardiTV Weekly
4h 52m
The PondCast
1d 3h
Replay Cast
2 days
CrankTV Team League
2 days
Replay Cast
3 days
CrankTV Team League
3 days
Replay Cast
3 days
RSL Revival
4 days
Clem vs Lambo
Scarlett vs Cure
CranKy Ducklings
4 days
IPSL
4 days
Dragon vs Hawk
[ Show More ]
RSL Revival
5 days
Classic vs Trap
herO vs SHIN
Sparkling Tuna Cup
5 days
IPSL
5 days
Bonyth vs Ret
WardiTV Weekly
6 days
Monday Night Weeklies
6 days
Liquipedia Results

Completed

YSL S3
HSC XXIX
Eternal Conflict S2 E2

Ongoing

IPSL Spring 2026
Acropolis #4
CSL 2026 Summer (S21)
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026

Upcoming

Escore Tournament S3: W3
ASL S22 SEASON OPEN Day 1
Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
CSLAN 4
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.