Generate lower case ASCII alphabet: Difference between revisions
Content added Content deleted
(→{{header|NetLogo}}: New Entry) |
m (→{{header|NetLogo}}: consistency) |
||
Line 2,039: | Line 2,039: | ||
<lang nesl>lower_case_ascii = {code_char(c) : c in [97:123]};</lang> |
<lang nesl>lower_case_ascii = {code_char(c) : c in [97:123]};</lang> |
||
=={{header|NetLogo}}== |
=={{header|NetLogo}}== |
||
====Rationale==== |
|||
Since NetLogo has no "ASC" type reporters, we will have to enumerate the characters. |
Since NetLogo has no "ASC" type reporters, we will have to enumerate the characters. |
||
To make an omission easier to detect, we use a phrase, instead of a list |
To make an omission easier to detect, we use a phrase, instead of a list |
||
Since the phrase has duplicates and spaces, we use other list tools to produce just the sorted alphabet |
Since the phrase has duplicates and spaces, we use other list tools to produce just the sorted alphabet |
||
===Code=== |
====Code==== |
||
<lang netlogo> |
<lang netlogo> |
||
to-report alphabet-lower |
to-report alphabet-lower |
||
Line 2,051: | Line 2,052: | ||
end |
end |
||
</lang> |
</lang> |
||
=== |
====Output==== |
||
<pre> |
<pre> |
||
observer> print alphabet-lower |
observer> print alphabet-lower |