Skip to content

SatLong

Narta Xaymar Dirks edited this page Nov 1, 2026 · 7 revisions
BlitzLLVM

SatLong 〔BlitzLLVM〕

SatLong(value)
SatLong:Int64(value)

Returns: The number, or the closest number of the type if it does not fit.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

Converts a number or a text to a Long (-9223372036854775808 to 9223372036854775807) and stops at -9223372036854775808 and 9223372036854775807 instead of wrapping around. This is a BlitzLLVM extension: the originals have no integers of other sizes. A whole number outside the range becomes the closest number of the range, and a real is rounded to the nearest whole number (halves go to the even one) first. A real that is not a number becomes 0. Long does the same for a real, but wraps whole numbers around.

Differences

  • Not in the originals, which have no integers of other sizes.

Examples

Print SatLong(ULong(-1))
Print SatLong(ULong(7))
9223372036854775807
7

Related Commands

SatByte 〔BlitzLLVM〕, SatInt 〔BlitzLLVM〕, SatShort 〔BlitzLLVM〕, SatUByte 〔BlitzLLVM〕, SatUInt 〔BlitzLLVM〕, SatULong 〔BlitzLLVM〕, SatUShort 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally