View Single Post
Old 12-21-2011, 03:39 PM   #10
Ruskie_it
Fanatic
Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.Ruskie_it ought to be getting tired of karma fortunes by now.
 
Posts: 538
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
Quote:
Originally Posted by chaley View Post
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.
Ruskie_it is offline   Reply With Quote