Clipper On Line • Ver Tópico - Converter decimal para base 36
Mudar para estilo Clássico
Discussão sobre a biblioteca Fivewin - O Clipper para Windows.
Postar uma resposta

Converter decimal para base 36

27 Jul 2017 14:55

Boa tarde amigos;

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

Converter decimal para base 36

27 Jul 2017 17:37

use a função NTOC()

Código:
    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

28 Jul 2017 09:33

Obrigada Daniel,me ajudou muito.
Postar uma resposta