Mirage Source http://miragesource.net/forums/ |
|
Add() http://miragesource.net/forums/viewtopic.php?f=210&t=647 |
Page 2 of 3 |
Author: | William [ Fri Oct 20, 2006 2:08 pm ] |
Post subject: | |
Haha.. So my Add command developed itself into a massive math lesson. Well, one thing is good about these. They can easilt be used for sadscript |
Author: | Lea [ Fri Oct 20, 2006 4:25 pm ] |
Post subject: | |
I think your code snippet is for VB.NET |
Author: | William [ Fri Oct 20, 2006 4:35 pm ] |
Post subject: | |
Why, does functions run faster in VB.net? |
Author: | James [ Fri Oct 20, 2006 8:46 pm ] |
Post subject: | |
My code? I am pretty possotive it's for Vb6. Anyhow, the reason for the Atan and stuff, is because it's Arctangent, meaning the length of the arc around the unit circle...the deffinition of an Inverse of a Sine function is the length of the arc, thus Arcsin and Sin^-1 are the same. |
Author: | William [ Fri Oct 20, 2006 9:03 pm ] |
Post subject: | |
I think he means that its not good in VB. But in VB.net.. maybe I missunderstood it.. |
Author: | Misunderstood [ Fri Oct 20, 2006 9:06 pm ] |
Post subject: | |
William wrote: I think he means that its not good in VB. But in VB.net.. maybe I missunderstood it..
I think you misunderstood |
Author: | William [ Fri Oct 20, 2006 9:08 pm ] |
Post subject: | |
Yeah, guessed so. You ment that it doesn't support Math.Tan etc? |
Author: | James [ Fri Oct 20, 2006 10:12 pm ] |
Post subject: | |
No, it DOES support Math.Whatever, try and type it in. lol. I tried all of these. |
Author: | Verrigan [ Sat Oct 21, 2006 12:30 am ] |
Post subject: | |
VB is fully object oriented.. Every object can have functions, methods, events, etc. as part of their structure. The Math object has several functions that can do mathematical problems. |
Author: | Misunderstood [ Sat Oct 21, 2006 3:17 am ] |
Post subject: | |
Verr VB is not object oriented. To be object oriented it must support polymorphism, encapsulation, and inheritance. VB6 does not support all three. Yes, objects can have methods and functions, but that does not mean the language is object oriented. However, it is possible for the Math object to have its own methods, such as tan. |
Author: | Verrigan [ Sat Oct 21, 2006 4:14 pm ] |
Post subject: | |
[Final Edit] I was originally going to ask you where you got your information about object oriented programming, but I have looked it up myself, and there are quite a few things throughout the internet that either:
So.. Let's just agree to disagree. |
Author: | Misunderstood [ Sat Oct 21, 2006 9:27 pm ] |
Post subject: | |
Ver... To be object oriented doesn't just mean the language can be oriented around objects . It has to support polymorphism (http://en.wikipedia.org/wiki/Polymorphi ... science%29) Which mean you can have one method do different things depending on the types of variables passed to it. In java(and other languages like C++) this is done with overloading a method. How could this be done with vb? Passing variants and looking at the type?...I guess you could call that overloading, but I wouldn't. It also needs to support Encapsulation, which is basically the ability to have Abstract Data types, also known as information hiding. In my opinion, for it to be encapsulation, only the operations should be visible. The data and the implementation of the operations should be hidden. I don't think VB can do this(I know it can have classes and you can implement classes) but I am not sure, you would probably know more about that. It also needs inheritance, which is the ability to inherit methods and data from other classes. I am not sure if VB has this or not. How do you consider VB object oriented? I would like to know in case I'm wrong |
Author: | Verrigan [ Sat Oct 21, 2006 11:31 pm ] |
Post subject: | |
Misunderstood wrote: Ver... To be object oriented doesn't just mean the language can be oriented around objects . I agree. Misunderstood wrote: It has to support polymorphism (http://en.wikipedia.org/wiki/Polymorphi ... science%29) Which mean you can have one method do different things depending on the types of variables passed to it. In java(and other languages like C++) this is done with overloading a method. How could this be done with vb? Passing variants and looking at the type?...I guess you could call that overloading, but I wouldn't. You can do it with variants, or you could send the variable pointer instead... There are many different ways this could be done.. Your link explained this rather well.. The Variant data type is clearly an example of overloading.. Though there are many different ways to perform type polymorphism in VB. Misunderstood wrote: It also needs to support Encapsulation, which is basically the ability to have Abstract Data types, also known as information hiding. In my opinion, for it to be encapsulation, only the operations should be visible. The data and the implementation of the operations should be hidden. I don't think VB can do this(I know it can have classes and you can implement classes) but I am not sure, you would probably know more about that. Vb can certainly do this.. For example. Look at your controls.. the actual variables are hidden from view by everything else (besides the control class).. You can only modify those variables (if they are private) by using the properties or methods. Misunderstood wrote: It also needs inheritance, which is the ability to inherit methods and data from other classes. I am not sure if VB has this or not. VB doesn't have an easy way of doing this, but it is possible.. Best to look this up on Google. (You'll find many results) Misunderstood wrote: How do you consider VB object oriented? I would like to know in case I'm wrong
I consider VB to be object oriented, because almost every aspect of VB is using objects.. Forms are objects.. Controls are objects.. They all have private variables with public and private methods... events.. etc. I don't consider myself the end all/be all/god of the subject.. I have my opinions, and they don't necessarily differ from others, except when they say that something isn't possible (with regard to OOP) in VB.. There may be work-arounds to get the job done, but I have yet to find something completely undoable in VB. Consider everything I wrote as an opinion on the topic, and I'm sure we won't have to argue about it. |
Author: | Misunderstood [ Sat Oct 21, 2006 11:48 pm ] |
Post subject: | |
Fair enough |
Page 2 of 3 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |