Skip to content

CUNSG


Converts an expression to unsigned

Syntax

` Cunsg ( expression )

`

Usage

` variable = Cunsg ( expression )

Converts a signedexpressionto an unsigned one, useful to force unsigned behavior of division or multiplication (including withShlandShr`).

This is the opposite of Csign.

Examples

start GeSHi

vb
Dim value As Short = -1
Print CUnsg(value)  '' will print 65535

end GeSHi

Dialect Differences

  • Not available in the -lang qb dialect unless referenced with the alias __Cunsg.

Differences from QB

  • New to FreeBASIC

See also

  • Csign

Back to DocToc

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