Alguém poderia me ajudar a converter esta função? VB Public Function binret(s1 As String, i1 As Integer) As Double Dim l1 As Double Dim i2 As Integer Dim i3 As Integer l1 = 0 For i2 = 1 To i1 i3 = Asc(Mid$(s1, i2, 1)) l1 = l1 + (i3 * (256 ^ (i1 - i2))) Next binret = l1 End Function
Delphi Function binret(s1 : string; i1 : Integer) : Double; var l1 : Double; i2 : Integer; i3 : Integer; begin l1 := 0; For i2 := 1 To i1 do begin i3 := ord(copy(s1, i2, 1)[1]); l1 := l1 + (i3 * (?????)); end; binret := l1; End; Agradeço antecipadamente.