Results for “ram”
Small, practical examples. Search by task or narrow things down below.
Read and total a flash lookup table
Arduino / C: Array size can be computed at compile time even for a flash-resident table.
Arduino / C✓ Tested
Reject an unsupported settings version
Arduino / C: A version byte lets firmware fall back when stored settings use another format.
Arduino / C✓ Tested
Remove a filename extension
Keep the path while removing its final extension.
filename✓ Tested
Remove a known prefix with a shell pattern
Bash Scripts: The hash expansion removes the shortest matching prefix without changing the original variable.
Bash Scripts✓ Tested
Return a collection as one pipeline object
PowerShell: The unary comma prevents the returned array from being enumerated at this boundary.
PowerShell✓ Tested
Return a status separately from a calculated result
C: An output pointer lets a function return success or failure independently of its numeric result.
C✓ Tested
Run cleanup after a caught exception
PowerShell: Use finally for cleanup that must occur after either success or failure.
PowerShell✓ Tested
Store a bounded null-terminated text setting
Arduino / C: Write a fixed buffer and explicitly terminate the retrieved copy.
Arduino / C✓ Tested
Store a compact configuration record
Arduino / C: Save a struct and retrieve it with the same field layout.
Arduino / C✓ Tested
Store and retrieve a multibyte integer
Arduino / C: put and get copy the bytes of a typed value.
Arduino / C✓ Tested
Use a default value for an unset variable
Supply a fallback without changing the original variable.
parameter expansion✓ Tested
Use an alternate value only when a variable is nonempty
Bash Scripts: The colon-plus expansion returns its word only when the parameter has a nonempty value.
Bash Scripts✓ Tested