0

default value” if often used to mean “The value to use when no value has been given” (see: Is "default" used for "a value used when nothing has been explicitly set" outside of IT world?)

I think there's a similar word to mean "The value to use when an invalid value has been given"

Notice the subtle but important difference: not given ↔ given but not valid

I think it may be the “fault value”, but as I'm not finding any reference to it's use, I'm dubious about it.

Clarification:

It would be the right word to use in the following process description:

Return x if x is in the range (BEGIN, END) or the <MISSING_WORD> value if not

Here “default value” is not correct because the value to be returned in this case is not necessarily one to be used. It might perfectly be a value that indicates that an erroneous input was given. And then, it might also be a value to be used, thus discarding the invalid input. In both cases “<MISSING_WORD> value” must be correct.

9
  • 5
    There is no correct name for that, you'll have to choose a suitable word and use it. Personally I think you are overthinking this and that default is just fine, it denotes the value to be used when the user doesn't provide a valid input, whether by omitting one or by providing a wonky one. Commented Jan 25, 2022 at 11:52
  • 4
    You seem to be attempting to make a distinction without a difference: a default value is the value to which a program reverts (defaults) upon failure (either by error or omission.)
    – Greybeard
    Commented Jan 25, 2022 at 11:56
  • 2
    Error flag value. Commented Jan 25, 2022 at 12:18
  • 1
    You don't seem clear what you want. If there is an invalid value, error, or exception in your function, you may want to return an error flag that indicates there was an error and signals to the caller not to proceed any further; or you may want to return a default value that can be used instead of the value that you failed to calculate. These are two different cases: in the first you indicate an error, in the second you do not. What happens afterwards is completely different. You shouldn't confuse the two cases.
    – Stuart F
    Commented Jan 25, 2022 at 14:56
  • 1
    'Corrected value' seems clear. Commented Jan 25, 2022 at 15:08

2 Answers 2

1

The term that I've sometimes seen and used is "fallback value".

This is derived from the following definition as in Lexico

An alternative plan that may be used in an emergency.

1
  • Nice, I like it. Not the word I was looking for, but a good option to use 👍 Commented Jan 27, 2022 at 10:15
-1

Could it be «on-error»? The “on-error value” ?

In this case the example given would say:

Return x if x is in the range (BEGIN, END) or the on-error value if not

Please comment whether you think this could be appropriate.

3
  • 3
    Picture me sticking two fingers down my throat at this suggestion! But tell us one more thing - is the on-error value the same as the no-value value? Commented Jan 25, 2022 at 13:57
  • @HighPerformanceMark (🤣) Certainly not. Taking as example a weather station in southern Spain, the default value (no-value value) might be SUNNY while the on-error value might be ERROR_DETECTED. Commented Jan 25, 2022 at 14:19
  • 1
    Avoid answering questions by asking another. Asking for comment is not an answer..
    – Anton
    Commented Jan 26, 2022 at 8:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.