Results for “typed parameters”
Small, practical examples. Search by task or narrow things down below.
Give a reusable record type a short name
C: A typedef names a structure type without changing its representation.
C✓ Tested
Await an asynchronous method result
C#: Use Task<T> for an async operation with a typed result.
C#✓ Tested
Narrow an object using a type pattern
C#: A successful is pattern introduces a strongly typed local variable.
C#✓ Tested
Pass a function as a callback
C: A typed function pointer permits behavior to be supplied to another function.
C✓ Tested
Read a small INI configuration
Python: Use ConfigParser typed accessors for configuration values stored as text.
Python✓ Tested
Represent a record with a dataclass
Python: Generate initialization and convert a typed record to a dictionary.
Python✓ Tested
Store and retrieve a multibyte integer
Arduino / C: put and get copy the bytes of a typed value.
Arduino / C✓ Tested
Validate an unknown value with a type guard
Check a field before treating unknown data as a typed object.
unknown✓ Tested