G
gmou
Dear group,
I am building a translator from C++ into VB (and into C#).
At the moment, I have a hard time figuring out the equivalent of a 'for'
loop in VB.
Given C++ code:
for( int i=0; test_fct(i); increment_fct(i) )
{
... // body of the loop
}
Would you opt for a 'While..End While' loop, or 'Do...Loop'?
Neither of these are clean translations, since the 'increment_fct' would
appear twice in VB.
Please visit the translation web site,
http://code2code.net?lang2=vb , and choose sample='VB_for_loop.cpp'.
Any suggestions welcome.
Regards,
/george moudry
I am building a translator from C++ into VB (and into C#).
At the moment, I have a hard time figuring out the equivalent of a 'for'
loop in VB.
Given C++ code:
for( int i=0; test_fct(i); increment_fct(i) )
{
... // body of the loop
}
Would you opt for a 'While..End While' loop, or 'Do...Loop'?
Neither of these are clean translations, since the 'increment_fct' would
appear twice in VB.
Please visit the translation web site,
http://code2code.net?lang2=vb , and choose sample='VB_for_loop.cpp'.
Any suggestions welcome.
Regards,
/george moudry