FIND YOUR NEXT FEW LINES

Results for “integer”

Small, practical examples. Search by task or narrow things down below.

114 snippets foundClear filters
JavaPrecise numeric calculations

Parse an integer in another base

Java: Supply an explicit radix to Integer.parseInt.

Java✓ Tested
JavaNumbers & dates

Parse an integer safely

Handle invalid Java integer input with NumberFormatException.

Java✓ Tested
CNumbers & memory

Parse an integer with validation

Validate range and trailing characters when parsing a C integer with strtol.

C✓ Tested
PowerShellDates & numeric validation

Parse an integer without throwing on invalid input

PowerShell: TryParse reports conversion success separately from its output value.

PowerShell✓ Tested
CNumeric parsing & arithmetic

Parse an unsigned hexadecimal integer

C: Use an explicit base and check both range and full consumption.

C✓ Tested
RustIterators & transformations

Parse only valid integers

Parse only valid integers in a complete Rust program using the standard library.

Rust✓ Tested
GoJSON & encoding

Preserve a large JSON integer

Preserve a large JSON integer using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CSerial communication

Print integers in different bases

Inspect a byte in decimal, hexadecimal, and binary.

Serial✓ Tested
C#JSON & binary formats

Read a big-endian binary integer

C#: Use BinaryPrimitives when the protocol byte order differs from or must not depend on the host.

C#✓ Tested
JavaEncoding & structured values

Read a big-endian integer from bytes

Java: Set a byte order explicitly when handling a binary protocol.

Java✓ Tested
GoJSON & encoding

Read a big-endian integer from bytes

Read a big-endian integer from bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
RustParsing & byte data

Read a little-endian integer from bytes

Read a little-endian integer from bytes in a complete Rust program using the standard library.

Rust✓ Tested