MASON-INTEREST-L Archives

February 2012

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Matt L. Miller" <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Fri, 24 Feb 2012 17:51:59 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (19 lines)
I was just looking through the SimState code and I noticed some cabbage in
the arg parsing methods:

indexAfterArgumentForKey(String key, String[] args, int startingAt)
keyExists(String key, String[] args, int startingAt)
argumentForKey(String key, String[] args, int startingAt)

None of those startingAt arguments appear to do anything (probably because
nothing in the class ever needs anything other than "0").

Far more nit-picky: I noticed that the comment in keyExists says "key can't
be the last string," no doubt a carry over from copying the code from one of
the other two methods; fortunately, the code itself doesn't reflect this,
since, of course, -help can be the last key.

Cheers,
Matt L. Miller
UC Davis

ATOM RSS1 RSS2