Results for “value”
Small, practical examples. Search by task or narrow things down below.
Remove one known scratch file
C: Check remove’s return value instead of assuming deletion succeeded.
C✓ Tested
Rename a known file
C: The standard rename function reports failure through its return value.
C✓ Tested
Replace NULL in a result
Choose a fallback for a missing value.
COALESCE✓ Tested
Represent a decimal quantity with a scaled integer
Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.
Arduino / C✓ Tested
Represent a small set of named states
C: An enum gives symbolic names to integer state values.
C✓ Tested
Represent progress whose total is unknown
HTML: Omit value to make a progress element indeterminate.
HTML✓ Tested
Require two conditions to be true
Python: Combine a lower and an upper bound to check whether a value is in range.
Python✓ Tested
Require two conditions to be true
C#: Combine a lower and an upper bound to check whether a value is in range.
C#✓ Tested
Require two conditions to be true
Java: Combine a lower and an upper bound to check whether a value is in range.
Java✓ Tested
Require two conditions to be true
JavaScript: Combine a lower and an upper bound to check whether a value is in range.
JavaScript✓ Tested
Require two conditions to be true
TypeScript: Combine a lower and an upper bound to check whether a value is in range.
TypeScript✓ Tested
Require two conditions to be true
C++: Combine a lower and an upper bound to check whether a value is in range.
C++✓ Tested