Quote:
Originally Posted by chaley
Glad you found template program mode!The strcmp function provides comparison relationals. The test function provides equality relationals.
|
I see! Argh, yeah, I wasn't used to the subtleties of a functional language.
Quote:
I assume that the above is in effect a requirements statement.
|
I was trying to describe what my function does, but since it also is what I wanted to achieve yes, it's the requirement.
I want my book organized in folders on the device. When they are part of a series, I want them under a folder with the name of the series. When they are not, they should go under the name of the author.
Quote:
First, the /""/ will be converted to //, which will convert to /. As such, there isn't much point in generating it, although it doesn't hurt anything. Second, the test function can be used to test for != '', which eliminates the need for the subfunction by directly testing if series is not empty.
|
Yep, I used that because I didn't know how to write it better...
And I know I should have refined it at home and not in the office.

Yes, I think that moving the test in the series field makes it simpler and more elegant.