Sets a maximum allowed value. When declaring a primitive that is inherently bounded, you can explicitly specify the bounds using min-value
and max-value
. For example, when modeling earthquake magnitude, you might want to specify that you can only have a minimum magnitude of 0 and a maximum magnitude of 12.
decimal (Magnitude) {
description (The magnitude of an earthquake)
features {
recognized-range {
min-value(0)
max-value(12)
}
}
}
Copyright 2024 Samsung All rights reserved