Talk:Count in octal: Difference between revisions

no edit summary
No edit summary
Line 23:
::::: Ok, it might a terminology thing. When I say native, I mean builtin to the language (possibly to an abstract level?). Lets take a variable A=19. From a language point of view, it is stored as a single decimal integer of value 19, from the point of view of the computer, it is stored in binary digits, but that is not a language concern. The native format of the variable is a decimal integer and its value 19, so I would say that the language has native decimal support. Does that make sense? Now, if the language also has native octal support, it could output that number as octal using a statement without evaluation code (again from a language point of view, the cpu might be doing something underneath, but that is not a language concern). If it does not have native octal support, then some digit crunching routines would have to be written within the language, to produce the required output. --00:13, 7 June 2011 (UTC)
::::::So then what language has native octal support? Or native anything but decimal support? I know in Java you can say "int a = 0xFF;" but when you print it without anything extra it will come out as "255". Does that still count as "native" to you? --[[User:Mwn3d|Mwn3d]] 00:57, 7 June 2011 (UTC)
 
:::::: So what you're looking for is something like "octal x = 12; print x;" giving back 14?. By that description, I'd bet nothing has native octal support, or native support for anything but decimal or, in some rarer cases, hexidecimal. (You could easily build such a thing in C++, but it would just be wrapping the number crunching into a class, which wouldn't be much different than the existing output modifiers.) [[User:MagiMaster|MagiMaster]] 01:30, 7 June 2011 (UTC)