ParameterDescription Maximum Incorrect

When called on a Discrete Parameter such as one like:

the api call PARAMETER_DESCRIPTION::maximum returns a value one greater than the actual maximum. In this case 3. This is quite annoying, as you have to know the type of the parameter to know whether to subtract 1 or not.

Easily reproduced. Latest version.

Your discrete parameter actually has three values it could be set to (0,1,2), whereas a continuous parameter with the same range will have a maximum of 2 because that is the highest value it can be set to.

I understand that, but it makes no sense from an API point of view.

If I want to loop through all the values of a generic parameter, I’d need to know whether the Event was Discrete (maximum is exclusive) or Continuous (maximum is inclusive). Is there some way I can check this with the current API?

It’s also just a really confusing API – the maximum of the discrete parameter is 2. The “length” is 3, sure, but that’s a totally different thing.

Ah yes, sorry, I am understanding you now. This can be confusing as there is no way to know if the parameter should be inclusive or exclusive of the maximum. I have added a task to investigate the best way to change this in an upcoming release.