Results for “from”
Small, practical examples. Search by task or narrow things down below.
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
Return a value from a dialog form
HTML: A form with method dialog closes its containing dialog without a network submission.
HTML✓ Tested
Return a value from a loop
Return a value from a loop in a complete Rust program using the standard library.
Rust✓ Tested
Return a value from a switch expression
Java: Use an exhaustive switch expression with a fallback for other input values.
Java✓ Tested
Return multiple named values from a method
C#: Named value tuples give lightweight field names without a separate class.
C#✓ Tested
Return text from a shell function
Capture a function’s output with command substitution.
function✓ Tested
Return two values from a function
Return two values from a function using a complete Go program with explicit sample inputs.
Go✓ Tested
Return typed data from an async function
Await a Promise and handle failures explicitly.
async✓ Tested
Round halfway floating-point values away from zero
C++: std::round has an explicit halfway rule different from truncation.
C++✓ Tested
Scale a value from the root font size
CSS: Rem units follow the document root instead of accumulating through nested font sizes.
CSS✓ Tested
Select a range from a collection
jQuery: slice includes the start index and excludes the end index.
jQuery✓ Tested
Separate a first item from the remaining items
JavaScript: Array destructuring and a rest element produce named pieces of a sequence.
JavaScript✓ Tested