Talk:Count in octal: Difference between revisions

m
(its a terminology thing)
 
(7 intermediate revisions by 5 users not shown)
Line 22:
 
::::: 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)
 
::::::: I would say thay a language that has output specifiers for octal has native octal support. --20:14, 7 June 2011 (UTC)
:::::::: What does that mean? For example, is this an output specifier for octal?
:::::::: <lang j> 8 #.inv 255
3 7 7</lang> --[[User:Rdm|Rdm]] 20:36, 7 June 2011 (UTC)
:::::::: Yes --[[User:Markhobley|Markhobley]] 23:30, 7 June 2011 (UTC)
 
::::::::FYI, that other task ([[Non-decimal radices/Output]]) used to be called "Common number base formatting", which I think is a better indication for what that task did than the title now, because it included the word "Common". That task was ''precisely'' for languages with output specifiers or specialized methods for ''specific'' bases, namely octal and hex (and binary in some). General base conversion routines for any base should not be there, and should instead be covered in the [[Non-decimal radices/Convert]] (which used to be called "Number base conversion") task. --[[User:Spoon!|Spoon!]] 07:10, 9 June 2011 (UTC)
 
::::::::: Octal, Hexadecimal, Decimal and Binary are special cases. Some languages have native support for these, some do not. So, conversion is required for some languages, and other languages do not require the conversion. This task neither requires or prohibits conversion, so best methods for handling an octal counter can be implemented here. The Non-decimal radices tasks either require conversion (not ideal for languages that have native support), or do not require conversion (not ideal for languages that do not have native support). Additionally counting does not necessarily involve conversion methods. This really should be a separate task IMHO. [[User:Markhobley|Markhobley]] 17:53, 5 July 2011 (UTC)
Anonymous user