View Single Post
  #8  
Old 05-07-2011, 05:29 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Devil_Lord2 View Post
I get up to here so far, excluding why this. is in front of a function... probably because I've never seen it before.. I would understand it without this. in front. Can it use that?
This this is slightly confusing to explain without a core understanding of how code evaluates. If you were to not write it, it would just be there implicitly, and sneak around in the background until it jumps out and confuses you. It's definitely important to learn about this (and the related concept of "objects") before you start seriously coding though.


Quote:
Originally Posted by Devil_Lord2 View Post
I thought

whatever = 6
return whatever

just returns 6 in whatever to the function that called it.. if it were a number, array, string, variable, or float, it would be inside whatever.. in this case 6..
It's best to throw away this idea rather than try to patch it up to something correct. It's somewhat close, but far away enough that'd it be faster to ignore it.


Quote:
Originally Posted by Devil_Lord2 View Post
Still trying to figure out the geometry/radians type post.. I haven't seen or used it at all.. If I read it a few times I might understand it :x
He was just giving examples rather than an explanation of how to think about each example. Look at Chris's post to try and learn by observation. Look at mine if you want a walkthrough.


Quote:
Originally Posted by Devil_Lord2 View Post
But yes I get you both.. I've always seen return ??? but never how it was used lol..
Thank you both!
Reply With Quote