Method `<<()
- Method
`<<
int
`<<(int
arg1
,int(0..)
arg2
)
mixed
`<<(object
arg1
,int(0..)
|object
arg2
)
mixed
`<<(int
arg1
,object
arg2
)
mixed
`<<(float
arg1
,int(0..)
arg2
)- Description
Left shift.
Every expression with the
<<
operator becomes a call to this function, i.e.a<<b
is the same aspredef::`<<(a,b)
.If
arg1
is an object that implements lfun::`<<(), that function will be called witharg2
as the single argument.If
arg2
is an object that implements lfun::``<<(), that function will be called witharg1
as the single argument.If
arg1
is a float andarg2
is a non-negative integer,arg1
will be multiplied by1<<
.arg2
Otherwise
arg1
will be shiftedarg2
bits left.- See also