bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Warning when passing an Int value to LongInt parameter

Open GWRon opened this issue 10 months ago • 0 comments

SuperStrict

Framework Brl.Blitz


Function PassAsLong(l:Long)
End Function

Function PassAsLongInt(l:LongInt)
End Function

Local i:Int = 10

PassAsLong(i)
PassAsLongInt(i)

results in a compile warning:

Compile Warning: In call to Function PassAsLongInt(l:LongInt). Argument #1 is "Int" but declaration is "LongInt". 

Shouldn't all Blitzmax-Integers fit into LongInt (4 or 8 bytes big) ?

GWRon avatar Mar 11 '25 15:03 GWRon