[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'math' (#rtl)

Sign

Return sign of argument

Declaration

Source position: line 0

function Sign(

  const AValue: Integer

):TValueSign; overload;

function Sign(

  const AValue: Int64

):TValueSign; overload;

function Sign(

  const AValue: Double

):TValueSign; overload;

function Sign(

  const AValue: Extended

):TValueSign; overload;

Description

Sign returns the sign of it's argument, which can be an Integer, 64 bit integer, or a double. The returned value is an integer which is -1, 0 or 1, and can be used to do further calculations with.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.