Talk:Abbreviations, easy: Difference between revisions

m
m (→‎Need some clarifications: corrected a phrase.)
m (→‎Incorrect example output?: answered a query.)
 
(4 intermediate revisions by 3 users not shown)
Line 22:
 
: The specification that had the phrase &nbsp; <big> "optional number" </big> &nbsp; was a carry-over from a &nbsp; ''cut-n-paste'' &nbsp; from the &nbsp; ''abbreviations, simple'' &nbsp; Rosetta Code (draft) task that was entered previous to this task. &nbsp; That phrase was removed as soon as I woke up the next afternoon. &nbsp; In any case, the above point isn't moot any longer. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 02:54, 19 September 2017 (UTC)
 
:: !!???? And yet that bullet point shown above is ''still'' in the spec, '''right now'''. How is it not moot? Even after I pointed it out and questioned it? Do you know what the definition of moot is? --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 10:18, 19 September 2017 (UTC)
 
::: I had deleted another phrase and I never got around to deleting the other. &nbsp; I got interrupted with something critical at home and I just got back to the computer very late this morning. &nbsp; The erroneous phrase has been elided. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 10:29, 19 September 2017 (UTC)
 
-----
Line 29 ⟶ 33:
What is meant by a null string? It has different meanings in different languages and could have several meanings depending on interpretation.
 
: Use whatever "null string" means in the computer language that is being used. &nbsp; I didn't mean to say that a null string is a string with a null in it. &nbsp; I always thought it generally meant a string of zero length. &nbsp; However, if you want, I could replace that phrase with: &nbsp; &nbsp; (or an empty string) &nbsp; &nbsp; ----- in all three Rosetta Code related &nbsp; &nbsp; '''ABBREVIATIONS, xxx ''' &nbsp; &nbsp; tasks. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:49, 19 September 2017 (UTC)
 
 
Line 42 ⟶ 46:
Mu # The Most undefined object. There is no there there; I don't even have an Uncle Harold.
 
: Asking a real person a question that usually requires a phrase when the answer doesn't/can't answer the question succinctly; &nbsp; asking a computer program (possibly an AI program) to do the same would probably require a different syntax for the answer. &nbsp; No human would answer with a "null string", they would say something that would be meaningful to the questioner. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 02:54, 19 September 2017 (UTC)
 
:: You've never dealt with actual users, have you. (Or at least me :-) ) --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 10:18, 19 September 2017 (UTC)
 
Maybe it should be a null byte? \z, ^@, \0 or \x00? C programmers will be familiar with those.
Line 49 ⟶ 55:
Or should it just be an empty string? And if it should, '''why not just state that?'''
: Because some people think that a blank string &nbsp; ''is'' &nbsp; an empty string (I know I could think that way, depending upon the context). &nbsp; &nbsp; Still others will argue, what is an empty string? &nbsp; Would it be the same as a null string, a null character, a string with a blank in it, ... &nbsp; &nbsp; But, if you want to return an empty string (with either definition, they both work for me). &nbsp; That is why the phrase "a null string" was used. &nbsp; I was trying to use a phrase that most people would understand. &nbsp; Even if they didn't, I would not bemoan them for using whatever they thought it meant (null string, a string with blanks in it, empty string, null character, whatever was idiomatic for the computer language(s) being used. &nbsp; I thought it would be clear that if a blank line was read, a blank (or equivalent) would be the answer (that is, the result from the computer program --- blank line in, blank line out ... a one-off cognitive version of GIGO). &nbsp; For the system that I'm on, a blank record has a length of zero, even though I thought of that line as having a blank in it. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 02:54, 19 September 2017 (UTC)
 
:: Yes, but the spec doesn't specify a '''blank''' string for output. The question isn't about '''blank''' strings. I never even mentioned a '''blank''' string. The spec say return a '''null''' string. The term '''null''' can be interpreted in many different ways.... Never mind. I'm not going to repeat my whole explanation and inquiry. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 10:18, 19 September 2017 (UTC)
 
== Incorrect example output? ==
 
Why does <code>put</code> return <code>PUT</code> instead of <code>*error*</code>? One of the stipulations is "if there isn't any lowercase letters in the word in the command table, then there isn't an abbreviation permitted." <code>PUT</code> and <code>PUTD</code> are the only commands that begin with <code>put</code> but they are both all-caps, so an abbreviation should not be permitted.
 
: Your statement saying " ... ''so an abbreviation should not be permitted''" &nbsp; is correct. &nbsp; However, &nbsp; ''put'' &nbsp; is <u>not</u> an abbreviation, it is a match, as specified by the bullet of the specifications (rules):
::* compares equal (regardless of case) to the leading characters of the word in the command table
: ... along with the other specifications. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 06:14, 23 March 2018 (UTC)