Skip to content

CSIGN ​


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 -1

end 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

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft