Idiomatically determine all the characters that can be used for symbols: Difference between revisions

→‎{{header|AWK}}: fix the code
(→‎{{header|AWK}}: fix indentation)
(→‎{{header|AWK}}: fix the code)
Line 21:
function is_valid_identifier(id, rc) {
fn = "is_valid_identifier.awk"
printf("function unused(%s) { arr[%s] = 1 }\n", id, id, id) >fn
printf("BEGIN { exit(0) }\n") >>fn
close(fn)
 
Line 49:
length(bad2), length(good2), good2)
exit(0)
}</lang>
}
</lang>
<p>output:</p>
<pre>