From VB.NET to Delphi7 convert.

P

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
 
K

Ken Tucker [MVP]

Hi,

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

Ken
---------------------------
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
 
D

Doug Taylor

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
-------------------------------------------------
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top