Talk:Generate lower case ASCII alphabet: Difference between revisions

m
 
 
(4 intermediate revisions by 2 users not shown)
Line 6:
 
"It's bug prone to enumerate all the lowercase chars manually in the code." I disagree with this pretty strongly. If the intent is to disallow such things as strings and literal lists of the 26 letters, that's fine, but it could be a little more clear. "During code review it's not immediate to spot the bug in a Tcl line like this contained in a page of code:" You don't even have to be able to program or know what ASCII is to spot that error, just know your (English) alphabet. An off by one error or a < instead of <= on the other hand can elude the best of us at times. I would drop the editorializing and just clarify that literals of the full alphabet are disallowed. &mdash;[[User:Sonia|Sonia]] ([[User talk:Sonia|talk]]) 17:18, 26 November 2014 (UTC)
 
== ASCII alphabet vs. EBCDIC vs. Latin (English) alphabet ==
I assume you meant a lowercase Latin (or English) alphabet. &nbsp; Other than the internal coding of the character (or rather, the lowercase letters), &nbsp; the glyphs (depending on the code page) aren't any different then an &nbsp; '''EBCDIC''' &nbsp; version. &nbsp; Generating the same lowercase letter sequence in '''EBCDIC''' doesn't &nbsp; ''define'' &nbsp; it as a lowercase '''EBCDIC''' sequence.
 
After saying that, a Latin (or English) alphabet may however, display differently, depending upon what code page is being used. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:04, 7 April 2016 (UTC)
 
: I don't think this task has anything to do with the visual appearance of the letters. If you are on a system which only supports EBCDIC for IO then I think for this task you would need an internal representation of ASCII as indices into an array of EBCDIC characters. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 03:49, 8 April 2016 (UTC)
 
:: Er, no, I don't. &nbsp; It's not the visual appearance of the &nbsp; ''letter'', &nbsp; it's what a particular 8-bit character is presented (shown) as. &nbsp; The hexadecimal value of &nbsp; '''<big>4A</big>''' &nbsp; is shown as ASCII &nbsp; '''<big>J</big>''', &nbsp; or as EBCDIC &nbsp; '''<big>¢</big>'''. &nbsp; So in that narrow sense, the glyph shown is important. &nbsp; That was one reason why I created the Rosetta Code task of &nbsp; ''Idiomatically determine all the lowercase and uppercase letters''. &nbsp; The point is that the program doesn't have to know what the ASCII code is for a (particular) lowercase letter. &nbsp; That's the idiomatic part of the task. &nbsp; The same point can be made for this task. &nbsp; It's this point in mind that I thought the author was making when he said to &nbsp; ''use a reliable style of coding''. &nbsp; Keep in mind, the REXX program that I entered works on both ASCII and EBCDIC (and makes no assumption about the whether or not the lowercase letters are contiguous), and there isn't a need to translate anything, no matter which system is being run on. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 04:41, 8 April 2016 (UTC)
 
::: Isn't [[Idiomatically_determine_all_the_lowercase_and_uppercase_letters]] a different task from this one? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 06:02, 8 April 2016 (UTC)
 
:::: Yes, it is. &nbsp; That task stress the &nbsp; ''idiomatically'' &nbsp; part of the task &nbsp; (instead of just listing all the characters from &nbsp; '''a''' ──► '''z''' &nbsp; (inclusive). &nbsp; The other task also asks for the uppercase versions of the letters. &nbsp; It should be noted, however, that the other task is still a draft task at this time. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 06:18, 8 April 2016 (UTC)
 
As to the &nbsp; &nbsp; ''use a reliable style of coding'' &nbsp; &nbsp; phrase, I interpreted that to mean to code the program in such a way to not assume that the lowercase letters may not be contiguous on other systems, and that the programer should test if a particular character is indeed, a lowercase character. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 23:04, 7 April 2016 (UTC)