Processing Tutorial 3 - Using Methods
Uploader Comments (thejaboston)
All Comments (21)
-
@thejaboston I will give it a try. Thanks.
-
@thejaboston wait wait. "Some people refer to functions as a method which returns a value as opposed to procedural method which does not return any value."
Sorry ,but its also wrong =) A "void" or "int, float" etc function is also a function in C/C++ and other languages. A method is a function in a class, like I wrote before. Wiki: "A method is a subroutine (or procedure or function) associated with a class"
Dont take me for a smart ass, I just want to clear this out =)
-
@thejaboston all of the processing functions are actually methods of some class in processing. Its like in c++ you write cout("text here") but in reality you use cout as a method of std class, so it would be std::cout("text here").
But user defined functions are just functions. If you would define a class and add functions there - it would be a method.
Thanks for the tutorials anyway. I was just confused at first you calling it a method.
-
thanks for the vid though
Why do you call regular Function a "method" ? It is very confusing and wrong, as methods are used with classes with "::".
Function !=method
shebotnov 3 days ago
@shebotnov Yes I apologise. Some people refer to functions as a method which returns a value as opposed to procedural method which does not return any value.
However I use function and method as the same word and I am grouping functions and methods together... But I do understand the confusion of relation if you take a function as a method which outputs or takes a value (or returns a value).
I should have possibly clarified this. Hope that helps.
thejaboston 1 day ago
@thejaboston I will also add; many programmers refer to methods and functions in the same way. It should not need confuse anyone when understanding this. This is not for me to prove you wrong or anything, this is just so you know in future when someone explains the same thing. again I hope this helped :).
thejaboston 1 day ago
when I put in: println("x Position is: " + moveX + "Y Postition is: " + moveY); it comes up with an error saying: It looks like your mixing "active" and "static" modes. What does this mean? Please help!!
ElectrolyteIsMe 3 weeks ago
@ElectrolyteIsMe that is odd. You shouldn't be getting that error with the syntax you have wrote there. Have you carefully checked that you put in the syntax correctly?
thejaboston 3 weeks ago
I have the latest version of P and have had errors with some of your code. Ps site says they have abandoned some of their functions including the 3D feature. That really bites because i planned on using my arduino UNO and P to make 3D tetris and other 8 bit games... oh well...
ledguy315 5 months ago
@ledguy315 You use OPENGL instead of P3D when you define the variables in the size function. so size(200, 200, OPENGL); would construct a 200 by 200 canvas and use OPENGL to render all your shapes and objects giving you access to all the 3D functions and the z plane! :). Hope that helped. sorry for the really late reply!.
thejaboston 1 day ago