Home All Groups Group Topic Archive Search About

From VB.NET to Delphi7 convert.

Author
25 Mar 2005 9:36 PM
Piterek
Hello. I have a question, did someone can convert from VB.NET source
code to Delphi7 code?

Dim n, x As Double
Dim tab() As Double = {-3, 0.5, -0.05}
-------------------------------------------------
Sub licz()
    Dim i As Integer
    x = 0
    For i = 0 To 2
        x = x * n + tab(2 - i)
    Next
End Sub
--------------------------------------------------

I really don't understand how convert
[code:1:7020b1dcb8]
Dim tab() As Double = {-3, 0.5, -0.05}
[/code:1:7020b1dcb8]
to Delphi7 :(
Please, help me!
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------       
                http://www.usenet.com

Author
26 Mar 2005 4:54 AM
Ken Tucker [MVP]
Hi,

        Take a look at babbelfisken.
http://web.telia.com/~u31115556/desc/programs.htm

Ken
---------------------------
"Piterek" <pit3***@o2-dot-pl.no-spam.invalid> wrote in message
news:4244844e$1_5@127.0.0.1...
Hello. I have a question, did someone can convert from VB.NET source
code to Delphi7 code?

Dim n, x As Double
Dim tab() As Double = {-3, 0.5, -0.05}
-------------------------------------------------
Sub licz()
    Dim i As Integer
    x = 0
    For i = 0 To 2
        x = x * n + tab(2 - i)
    Next
End Sub
--------------------------------------------------

I really don't understand how convert
[code:1:7020b1dcb8]
Dim tab() As Double = {-3, 0.5, -0.05}
[/code:1:7020b1dcb8]
to Delphi7 :(
Please, help me!
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
                http://www.usenet.com
Author
29 Mar 2005 3:44 PM
Doug Taylor
On 25 Mar 2005 15:36:14 -0600, pit3***@o2-dot-pl.no-spam.invalid
(Piterek) wrote:

>Hello. I have a question, did someone can convert from VB.NET source
>code to Delphi7 code?
>
>Dim n, x As Double
>Dim tab() As Double = {-3, 0.5, -0.05}

VAR
  n,x : Integer;
tab : array of Integer = (-3,0.5,-0.05);

Procedure licz;

  Var
   I : Integer;
Begin
   X := 0;
  for i := 0 to 2 do
    x::= x * n + tab[2-i];
End;

It is years since I programmed in Pascal, so the filling of the array
may be wrong and also the use of Global variables is frowned in the
Pascal world;

Doug Taylor

Show quoteHide quote
>-------------------------------------------------
>Sub licz()
>    Dim i As Integer
>    x = 0
>    For i = 0 To 2
>        x = x * n + tab(2 - i)
>    Next
>End Sub
>--------------------------------------------------
>
>I really don't understand how convert
>[code:1:7020b1dcb8]
>Dim tab() As Double = {-3, 0.5, -0.05}
>[/code:1:7020b1dcb8]
>to Delphi7 :(
>Please, help me!
>Posted at: http://www.groupsrv.com
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
>----------------------------------------------------------
>    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
>----------------------------------------------------------       
>                http://www.usenet.com