1 Replies - 1225 Views - Last Post: 26 July 2008 - 05:05 PM

#1 jacobjordan   User is offline

  • class Me : Perfection
  • member icon

Reputation: 115
  • View blog
  • Posts: 1,499
  • Joined: 11-June 08

Multi-lingual programs

Posted 26 July 2008 - 04:38 PM

Man, this is the LAST time i will make a program across two different languages. I am making an icon editor, because i would like a better one than the Greenfish icon editor and i'm too cheap to buy a good $60 one. I am making the program itself in VB.NET and all it's dependencies in C#. I made it in different languages to evaluate which one i like better. It can get VERY confusing. As i debug the program, i need to constantly make changes in both languages. I often find myself using the Dim command in C# and ending lines in VB with semicolons. So far, i've typed a full If...Then statement in C#, tried to use the null keyword in vb, tried to declare a vb variable as static, used ByVal and ByRef when declaring functions in C#, used // for comments in vb, used & when joining strings in C#, tried to use escape characters in vb, and other things i don't even remember despite the editor not highlighting any of the keywords. To give you an idea of what some of my code might of looked like, here is a function i threw together:

Friend Function Double SomeFunction(ByVal int i, ref image As Drawing.Bitmap) As Double
	  Dim int count = i;
	  If (i == 50) Then
			For i = 50; i <= 100; Step 1;
	  End If
	  Return CDbl(Math.Ceiling(i);
} End Function

Sorry i couldn't have that code highlighted, but DIC doesn't seem to have syntax highlighting for VBC# .NET.

Is This A Good Question/Topic? 0
  • +

Replies To: Multi-lingual programs

#2 Martyr2   User is online

  • Programming Theoretician
  • member icon

Reputation: 5342
  • View blog
  • Posts: 14,235
  • Joined: 18-April 07

Re: Multi-lingual programs

Posted 26 July 2008 - 05:05 PM

But you know, it can be a pain in the ass for sure. However, it is also great practice for those programmers who are verse in multiple languages. Often times we are asked in the industry to port over code and it helps you learn not just the syntax but the ideas behind the code.

As you may know that not always can code be word for word converted and you may have to write functions in different ways to address the same problem.

Makes us better problem solvers I think. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1