Idiomatically determine all the characters that can be used for symbols: Difference between revisions
Idiomatically determine all the characters that can be used for symbols (view source)
Revision as of 16:06, 4 September 2019
, 4 years ago→{{header|Phix}}: enhanced the compiler!
(→{{header|Phix}}: enhanced the compiler!) |
|||
Line 400:
{ng2,length(ok2),ok2}}
end function
sequence r = check(0,127)
printf(1,"ansi characters:\n===============\n")
printf(1,"1st character: %d
printf(1,"2nd..nth char: %d
r = check(128,255)
integer ok8 = 0, ng8 = 0
for i=#80 to #10FFFF do
if i<#D800 or i>#DFFF then
Line 424:
if ok then
ok8 += 1
else
ng8 += 1
Line 431 ⟶ 430:
end for
printf(1,"utf8 characters: \n===============\n")
printf(1,"
{{out}}
<pre>
ansi characters:
===============
1st character: 75
2nd..nth char: 65
utf8 characters:
===============
bad:0, good:1,111,936
</pre>
Note that
=={{header|Python}}==
|