CSIGN
- Source: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgCsign
- Last revised: 2016-03-12
Converts an expression to signed
Syntax
` Csign ( expression )
`
Usage
` variable = Csign ( expression )
`
Description
Converts an unsigned expression to a signed one, useful to force signed behavior of division or multiplication (including with Shl and Shr).
This is the opposite of Cunsg.
Examples
start GeSHi
vb
Dim value As UShort = 65535
Print CSign(value) '' will print -1end GeSHi
Dialect Differences
- Not available in the -lang qb dialect unless referenced with the alias
__Csign.
Differences from QB
- New to FreeBASIC
See also
Cunsg
Back to DocToc