Código: Selecionar todos
PROCEDURE Main
LOCAL nValue1 := 2.000, nValue2 := 2.555
? hb_ntos( nValue1 ), hb_ntos( nValue2 )
? hb_ValToExp( nValue1 ), hb_ValToExp( nValue2 )
? hb_ValToStr( nValue1 ), hb_ValToStr( nValue2 )
? Str( nValue1 ), Str( nValue2 )
? NTOc( nValue1 ), NToc( nValue2 )
? StrFormat( nValue1 ), StrFormat( nValue2 )
? ValToCharacter( nValue1 ), ValToCharacter( nValue2 )
? ValToPrgExp( nValue1 ), ValToPrgExp( nValue2 )
RETURN
2.000 2.555
2.000 2.555
2.000 2.555
2 2
2.000 2.555
2.000 2.555
Alguma idéia se existe alguma função que retorne 2 e 2.555 ?
Tudo bem, criei a minha, mas será possível que tem tanta função no Harbour e nenhuma pra isso?
Motivo simples:
Um backup em SQL de 1 milhão de registros pode gerar três milhões de caracteres a mais por causa do ".00", contando apenas um único campo.
E se existir uma função pronta, deve ser mais rápida que a minha pra muitos registros.



