Talk:Count in octal: Difference between revisions

its a terminology thing
No edit summary
(its a terminology thing)
Line 20:
 
:::: It still doesn't make much sense. 0377 may be octal in C++, but that's not native. There's no type in any language I know of that's tied to a specific base in the sense you seem to be implying. Natively, things are either stored as binary for the machine's benefit, or decimal for the human's. Can you give an example of anything else? [[User:MagiMaster|MagiMaster]] 23:48, 6 June 2011 (UTC)
 
::::: 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)