This is a discussion on Decimal to any number system within the Adobe Flex Programming forums, part of the Web Development category; hey!... its very simple to get the binary value of a number in flex. i really wonder of this features ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| hey!... its very simple to get the binary value of a number in flex. i really wonder of this features in flex. var n:Number = 8; Alert.show(n.toString(2)); it returns 1000; Same way: To convert octal number, Alert.show(n.toString(8));. To convert Hex number, Alert.show(n.toString(16));. its very simple and will be very user full when you are working with maths oriented functionality Thanks KBala ![]() Last edited by kbala : 07-17-2007 at 12:39 AM. |
| Sponsored Links |
| |||
| Yes Bala, This is the sample one for understanding how the flex is very powerful development tool. Even in .NET also there wont be any functions like this. Now the flex is having the AS3 with more functionality added to it. So we will be having a lot advandage of using flex. thanks ![]()
__________________ Karpagarajan. R Necessity is the mother of invention |
| |||
| Hi..... .Net have lot of functions like these...... ".Net is an Ocean" below few examples........ Converting decimal to binary in C#.NET int a = 12; MessageBox.Show(Convert.ToString(a, 2)); Converting decimal to octal in C#.NET int a = 12; MessageBox.Show(Convert.ToString(a, 8)); Converting decimal to HexaDecimal in C#.NET int a = 12; MessageBox.Show(Convert.ToString(a, 16)); |
| |||
| Yes, But the thing is here every data types and objects itself have a convertion function toString which helps you to convert any type of objects to number or string. In .NET they have defined the separate class or module for the convertion. When calling the Convert object, what the compiler will do is it will load all the functions and properties of the Convert class and call your convertion function which will take a bit memory. Here we have just talked about how the flexible the program was. Really it is a good to understanding and do the coding. Anyway in each programming language, they are having the convertion functions. So we dont need to worry about it. thanks
__________________ Karpagarajan. R Necessity is the mother of invention |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Add a number of days to a date | itbarota | HTML, CSS and Javascript Coding Techniques | 6 | 09-23-2008 01:38 AM |
| Difference between System.String and System.StringBuilder class? | S.Vinothkumar | C# Programming | 1 | 10-29-2007 05:23 AM |
| How do I convert a Number into a String with exactly 2 decimal places? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 10-26-2007 05:22 AM |
| What’s the difference between the System.Array.CopyTo() and System.Array.Clone() ? | Archer | C# Programming | 2 | 08-25-2007 03:00 AM |
| How to convert Decimal to Binary in Flash? | kingmaker | Flash Actionscript Programming | 1 | 07-21-2007 02:48 AM |