1 Replies - 4714 Views - Last Post: 07 February 2009 - 12:19 AM Rate Topic: -----

#1 jenphoenix  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-November 08

convert c to vb.net

Posted 06 February 2009 - 07:32 PM

#include "global.h"

struct entry keywords[] = {
	"div", DIV,
	"mod", MOD,
	0, 0
};

init()
{
	struct entry *p;
	for(p = keywords;p -> token; p++)
	 insert(p -> lexptr, p->token);
}



how to convert structs from c program to vb.net program??
also the header files.
i want to put it in a module in vb.net but i dont know how to convert some of the code..

Is This A Good Question/Topic? 0
  • +

Replies To: convert c to vb.net

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4438
  • View blog
  • Posts: 12,309
  • Joined: 18-April 07

Re: convert c to vb.net

Posted 07 February 2009 - 12:19 AM

VB.NET has structures too, very similar. Below is an example of a structure...

Structure entry
	Public div As String
	Public mod As String
End Structure



Do a google search for VB.NET structures and you can find all sorts of material on how to use them.

VB.NET has no need for headers, instead the .NET framework uses namespaces. You will see them at the top of your programming like System.IO would handle files etc. Again, check out "namespaces" on the net.

Lastly, VB.NET also has modules which you can simply add to your project. Code in modules are designed to be seen throughout the project, just like they did back in VB 6. Modules can contain classes, structures, enums, functions etc.

Looks like you might just need to pick up a VB.NET book and do a little reading on the related chapters to modules, namespaces, and structures.

:)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1