Can't set double to POSITIVE_INFINITY using Argument.Default

0 views
Skip to first unread message

bill.ma...@gmail.com

unread,
Nov 7, 2007, 1:26:02 AM11/7/07
to ResearchAssistant
This doesn't work:

@Argument("Minimum value to display")
@Argument.Switch("--min,-m")
@Argument.Default("Double.NEGATIVE_INFINITY")
public double min;

Neither does this:

@Argument("Minimum value to display")
@Argument.Switch("--min,-m")
@Argument.Default("NEGATIVE_INFINITY")
public double min;

Should these work?

This does work:

@Argument("Minimum value to display")
@Argument.Switch("--min,-m")
public double min = Double.NEGATIVE_INFINITY;

But I thought it was discouraged to assign initialization values to
Arguments?

bill.ma...@gmail.com

unread,
Nov 7, 2007, 1:27:02 AM11/7/07
to ResearchAssistant
BTW, please let me know if it's inappropriate to be posting this kind
of message here. Should I just email these to you (Dan)?

dramage

unread,
Nov 12, 2007, 2:01:29 PM11/12/07
to ResearchAssistant
Thanks for the bug report! RA uses Double.parseDouble to turn these
doubles into strings, but it should probably support the special cases
of positive and negative infinity and maximum and minimum value and
NaN.

And yes, posting this kind of question / report is a great use of this
forum. It's my email misconfig that kept me from seeing this for a
few days.

dan


On Nov 6, 10:26 pm, bill.maccart...@gmail.com wrote:

Reply all
Reply to author
Forward
0 new messages