Clipper On Line • Ver Tópico - Converter decimal para base 36
Página 1 de 1

Converter decimal para base 36

MensagemEnviado: 27 Jul 2017 14:55
por Daiane
Boa tarde amigos;

alguém aqui conhece alguma função para converter decimal em base 36?

Converter decimal para base 36

MensagemEnviado: 27 Jul 2017 17:37
por Daniel
use a função NTOC()

    NTOC(<nLONG|cHexLONG>,[<nBase>],[<nLength>],
        [<cPad>]) --> cCharacterstring

Arguments

     <nLONG|cHexLONG>  Corresponds to a decimal number or hexadecimal
     character string to convert.

     <nBase>  Designates the number system base, from 2 to 36
     (inclusive), to use in the result.  The default is the decimal system,
     base 10.

     <nLength>  Designates the length of the string that results.  The
     maximum length is 255.  The default is the length required for the
     conversion.

     <cPad>  Designates a pad character to pad the string result on the
     left.  The default value is a space.
     
Convert to base 36:

        ? NTOC(43981, 36, 4)          // "XXP"


Converter decimal para base 36

MensagemEnviado: 28 Jul 2017 09:33
por Daiane
Obrigada Daniel,me ajudou muito.