![]() ![]() This is, these are done without your intervention. T = s.ToText // Both variables have the same text using the "ToText" method in order to convert it to the expected type by the target variable.īoth cases shows implicit conversions. I = n // The 'i' variable will have the value 10, losing the decimal part as result of the implicit conversion process For example, these could be some type conversions you made in a regular basis: Dim n as Double = 10.20 ![]() In these cases, everything happens behind the scenes. For example, when you use simple types like Double or Integer, or even when assigning a String value to a Text variable. If you are using Xojo already, or any other programming language, then I’m pretty sure you are using casting without even noticing it. If you are interested in this (and you should be), continue reading and discover what it is, why you should be interested in it and how can you use it in your next Xojo app! One of these language tools is, in fact, common in other low level programming languages: Casting or type conversion. Xojo embraces that philosophy in the Xojo language itself, allowing us to implement code in a flexible way for reuse, extension and maintainability that reduces the development cycles. Object Oriented Programming ( OOP) puts in our hands the ability to create apps in a flexible and powerful way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |