Non-decimal radices/Input: Difference between revisions

Content added Content deleted
Line 712: Line 712:
{{255}}
{{255}}
</pre>
</pre>
Note the need for %f (if you want to get an atom rather than an integer back), and double braces (it's a list of potentially several different possible result sets/interpretations), and that scanf() works best with a few literals (esp spaces).
Note the need for %f (if you want to get an atom rather than an integer back), and double braces (it's a list of potentially several different possible result sets/interpretations), and that scanf() works best with a few literals (esp spaces but most certainly <b><i>not</i></b> radix prefixes) in the format string.
Finally note that while you can use "#DEADBEEF" (without the quotes, ie a fairly big hex number) in a source code file, the compiler will choke on "DEADBEEF", and so too will scanf().
Finally note that while you can use "#DEADBEEF" (without the quotes, ie a fairly big hex number) in a source code file, the compiler will choke on "DEADBEEF", and likewise so too will scanf(), and the only way round that is to insert the right prefix at the right place.


=={{header|PHP}}==
=={{header|PHP}}==