Base 60???? estas seguro???? no sera base 64???Creo que debe ser base 64, bueno para convertir "a o de" base 64 usas ConvertConvert.ToBase64String' para convertir a base 64 yConvert.FromBase64String' para convertir desdeOk esito seria Salu2
//----------------------------------------------------// Programa...: NumToB60// Fecha......: 07/Octubre/2004// Ultima Mod.: 11/Octubre/2004// Descripción: Convierte un número decimal a base 60.function NumToB60(nB10: Int64): String;var cB60: String; nResiduo: Int64; cStr60 : String[60];begin cB60:= ''; cStr60 := '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx'; while nB10 > 0 do begin nResiduo := nB10 Mod 60; nB10 := nB10 Div 60; cB60 := cB60 + Copy(cStr60,nResiduo+1,1); end; Result := ReverseString(cB60);end;
Bueno entonces que yo conozca una funcion ya hecha no creo que la haya asi que tendras que realizar tu propia implementacio ni que hacer, ahora yo tampoco le voy a Delphi (ojala en un futuro no muy lejano si) pero la idea que se me vendria a la mente seria usar los tipos de conversion genericos que se utiliza para conversiones de decimal a binario, u octal, hexadecimal y partir de ahi para convertir a base 60. Suerte con tu implementacion.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cB60 As String Dim nResiduo As Int64 Dim nB101 As String Dim nB10 As Int64 Dim Rpe As String Dim cStr60() As String = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", _ "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", _ "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", _ "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", _ "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", _ "t", "u", "v", "w", "x"} cB60 = "" nB101 = TextBox1.Text nB10 = Val(nB101) While nB10 > 0 nResiduo = nB10 Mod 60 nB10 = nB10 / 60 cB60 = cB60 + cStr60(nResiduo).ToString End While Rpe = Trim(Right(cB60, 1) + Mid(cB60, 4, 1) + Mid(cB60, 3, 1) + Mid(cB60, 2, 1) + Left(cB60, 1)) Label1.Text = Rpe.ToString End Sub