Ch6 Making Comments Precise and Compact
SOFTWARE ENGINEERING/Art Of Readable Code 2012. 11. 23. 11:131.Describe Function Behavior Precisely
// Return the number of lines in this file.
var CountLines = function (filename, reply)
{
//# remove everything after the second '*'
name = '*'.join(line.split('*')[2]);
}
// Count how many newline bytes ('\n') are in the file.
var CountLines = function (filename, reply)
{
//# remove everything after the second '*'
name = '*'.join(line.split('*')[2]);
}
// Rearrange 'v' so that elements < pivot come before those >= pivot;
// Then return the largest 'i' for which v[i] < pivot (or -1 if none are < pivot)
var Partition = function (filename, reply)
{
//# remove everything after the second '*'
name = '*'.join(line.split('*')[2]);
}
// Example: Partition([8 5 9 8 2], 8) might result in [5 2 | 8 9 8] and return 1
var Partition = function (filename, reply)
{
//# remove everything after the second '*'
name = '*'.join(line.split('*')[2]);
}