COBOL - Funções intrínsecas - SIGN



Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

COBOL - Funções intrínsecas - SIGN
Intrinsic functions - Enterprise COBOL for z/OS 6.3.0

The SIGN function returns +1, 0, or –1 depending on the sign of the argument.

The function type is integer.

argument-1
Must be of class numeric.

The returned value is as follows:

  • If the value of argument-1 is greater than zero, the returned value is 1.
  • If the value of argument-1 is zero, the returned value is 0.
  • If the value of argument-1 is less than zero, the returned value is -1.


© Copyright IBM Corp.