Talk:Man or boy test: Difference between revisions

No edit summary
Line 2:
 
As written, this task accomplishes absolutely nothing whatsoever. No functionality is mentioned or referenced. There's a pointer here on the discussion page to a gif file of a scan of an old article that does not specify any kind of algorithm whatsoever and no criteria for determining whether any piece of code is "valid" for this task.
 
: I didn't write the task, but if you look at Knuth's example, it should be obvious that the criterion is "are the updates to ''k'' inside ''B'' correct"? Or in other words, does ''B'' access the "correct" frame when accessing ''k''? You can also determine validity from the output given in the example: If it's -67, then it's correct.
 
The Knuth article touts a piece of code for testing something about the implementation of ADA compilers and thus any piece of code that does not compile as valid ADA <i>fails</i> the test as referenced.
 
: Didn't read the article, but originally this was about ALGOL, not ADA. Anyway, the programming language shouldn't matter.
 
The task description needs to be clarified at least to the point where the following question can be answered:
The BASIC one-liner: <tt>10 PRINT "-67"</tt> will output what appears to be "the correct result". Does that make it an entry for this task (I highly suspect it doesn't) and <i>why not?</i> -- [[User:Sgeier|Sgeier]] 17:05, 26 March 2008 (MDT)
 
: It doesn't make it an entry for this task, because your BASIC program doesn't attempt to deal with access to variables in different stack frames. And it doesn't follow the outline of calling nested subroutines ''A'' and ''B'', either.
 
: If you still think the task is unclear with this additional information, could you try to come up with some way of phrasing it that you would understand? As the task was clear to me, I'm probably the wrong person to do that :-) -- [[User:Dirkt|Dirkt]] 08:11, 27 March 2008 (MDT)
 
=== Copyright issues ===
Anonymous user