Not sure what this line does
(or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
This line confuses me quite a bit. the full program is here if you need it to follow: http://paste.lisp.org/display/124929
'Parse-integer' will turn a string into and integer right? if possible. And ':junk-allowed t' makes it开发者_高级运维 accept junk strings somehow right?
Not sure what the 'or' and the 0 at the end are though.
Thanks.
or
goes through the forms passed to it, evaluates them in order until it finds one that does not evaluate to nil, and returns that result. So this will return the result of parse-integer
if that call succeeds in parsing an integer, or 0 if not.
精彩评论