Objective C Programming Tutorial - 11 - Type Casting and Assignment Operators
Top Comments
All Comments (73)
-
"not cool man not cool." lol
-
haha thanks for the shortcut! so much better!
-
@TheReinaldomartinez i will not feed the troll
-
@TheReinaldomartinez Wow dude, chill. You don't seem like an experienced programmer because you sound like a total idiot.
You shouldn't be like "OMG NO U IDIOT BUCKY NEVER WRONG LOL" because he is a human, humans make mistakes.
And learn to disable Caps Lock. There is a button for it on Macs, it's right below Tab.
-
It's not converting it, it's chopping it off. As you said, integers can't contain decimals.
If it was converting it the output would be 27. Not 26.
-
@louisdebmusic Based on my understanding, you can't assign a floating point number (26.77) to an integer variable (bucky). So, the (int) typecast is used to turn the number 26.77 into an integer so that it can be assigned to bucky.
-
@jayce20010 I still have nightmares about the first C class I took where we did just that, we must have spent a solid month on conversions.
-
I'm sure this has been covered and i've forgotten but I don't understand the purpose of:
int bucky = (int) 26.77;
Can you not just use:
int bucky = 26.77;
Please help
-
@Mewigi SHUT THE FUCK UP !!! WHO THE FUCK DO YOU THINK YOU ARE ? ARE YOU THE YOUTUBE POLICE ???? SHUT YOUR STUPID DOG MOUTH IDIOT!!! BUCKY IS A GENIUS!! , HE IS NEVER WRONG, THANKS TO HIM I HAVE THIS WONDERFUL PART TIME JOB THAT HELPS ME MAKE A LOT OF MONEY YOU IDIOT!!! SO WHO THE FUCK ARE YOU TO JUDGE ME ?????
-
@TheReinaldomartinez No you don't. Not when you flame people in all caps, when all they were trying to do was correct Bucky, with valid corrections, in order to help new programmers. And if you really were an experienced programmer, you yourself would see flaws in Bucky's code that only an experienced programmer would notice. Also, you would probably be acting differently, because most programmers I have met know how to 1) defend their views and get into proper arguments, and 2) use a keyboard.
Really Great Tutorials buddy :]
kmdo86 1 year ago 48
its called text edit
codybfd 1 year ago 26