By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,899 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,899 IT Pros & Developers. It's quick & easy.

C# to standard C conversion

P: n/a
Hi
We are thinking of purchasing some algorithms from another company.
These are written in VB.NET. We need to run these algorithms on a
embedded microcontroller. What am thinking is convert the VB.NET to C#
using one of the programs available (recommendation?) and then attempt
to convert the C# to standard C by hand.

Can anyone offer any advice on the feasibility and procedure for
doing this?

I have not seen their code but there will be no user interface.

Thanks for any help
Liam
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Liam wrote:
Hi
We are thinking of purchasing some algorithms from another company.
These are written in VB.NET. We need to run these algorithms on a
embedded microcontroller. What am thinking is convert the VB.NET to C#
using one of the programs available (recommendation?) and then attempt
to convert the C# to standard C by hand.
VB.net has all kinds of features that C doesn't have, especially
garbage-collection.

Typically .NET programs are written to minimize development-time, not
runtime and memory-consumption, and you need to run the code on a
micro-controller?

I can't see how you would expect a conversion from VB to C# helping you.
C# and C are pretty much unrelated beasts.
Can anyone offer any advice on the feasibility and procedure for
doing this?
I'm pretty sceptic... converting from VB.NET to C can hardly be called
"converting", probably you will be "rewriting". So many fundamental
things are different in the two worlds of VB.NET/PC vs. C/micro-controller.

Most micro-controllers don't even have any dynamic-memory allocation,
integers of wierd sizes,... there could be lots of problems waiting for you.

Which algorithms are you talking about? Are these algorithms very
difficult to implement? is there no available C implementations? can't
you hire a company with micro-controller programming experience to do this?
I have not seen their code but there will be no user interface.


Well, I would be surprised, if the algorithms are applicable for a
micro-controller :)

--
Helge
Nov 16 '05 #2

P: n/a
Our Instant C# VB.NET to C# converter will do a very good job on the first
part of your project (download the Demo at www.instantcsharp.com), but C# to
C is not going to be trivial. C# to C will be easier than VB to C though...

David Anton
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# converter and the Instant VB C# to
VB.NET converter

"Liam" wrote:
Hi
We are thinking of purchasing some algorithms from another company.
These are written in VB.NET. We need to run these algorithms on a
embedded microcontroller. What am thinking is convert the VB.NET to C#
using one of the programs available (recommendation?) and then attempt
to convert the C# to standard C by hand.

Can anyone offer any advice on the feasibility and procedure for
doing this?

I have not seen their code but there will be no user interface.

Thanks for any help
Liam

Nov 16 '05 #3

P: n/a
TJB replied to:
Hi
We are thinking of purchasing some algorithms from another company.
These are written in VB.NET. We need to run these algorithms on a
embedded microcontroller. What am thinking is convert the VB.NET to C# using one of the programs available (recommendation?) and then attempt to convert the C# to standard C by hand.


Unless their go-by code is that good, I would go for a vendor who is
producing the code you want in standard C and skip the conversion. I'm
really shocked if any numerical or algorithm code in VB didn't also
exist in C somewhere.

Still, if you must have VB code as a go by, then, I would recommend you
go straight from VB to C and skip the C# step. C# and VB are basically
the same language but different syntax, and both are entirely unlike
standard C.

Nov 16 '05 #4

P: n/a
If they're just algorithms, and you're going to get access to the VB source
code, then hire a seasoned developer with microcontroller experience to just
re-implement the algorithms. Whichever way you go--some sort of automated
conversion vs. manual conversion--you're going to have to debug the results.
All I know is that if I were the guy who had to debug it, I'd much rather be
working from code that I wrote (even if I got the algorithms from looking at
someone else's VB code), than code that came from some sort of conversion
tool.
"Liam" <en***********@dial.pipex.com> wrote in message
news:5d*************************@posting.google.co m...
Hi
We are thinking of purchasing some algorithms from another company.
These are written in VB.NET. We need to run these algorithms on a
embedded microcontroller. What am thinking is convert the VB.NET to C#
using one of the programs available (recommendation?) and then attempt
to convert the C# to standard C by hand.

Can anyone offer any advice on the feasibility and procedure for
doing this?

I have not seen their code but there will be no user interface.

Thanks for any help
Liam

Nov 16 '05 #5

P: n/a
Liam wrote:
Hi
We are thinking of purchasing some algorithms from another company.
These are written in VB.NET. We need to run these algorithms on a
embedded microcontroller. What am thinking is convert the VB.NET to C#
using one of the programs available (recommendation?) and then attempt
to convert the C# to standard C by hand.

Can anyone offer any advice on the feasibility and procedure for
doing this?


Which controller?
8, 16, 32 bit?
PIC, Arm, AVR, 8051, 68hc12?

There is a C# compiler for the Arm: seach for "Pocket C#"

The stronger the controller the better your idea sounds.

It's a terrible idea if your target is a PIC. You'd likely need
hand-coded assembler in this case.

Eric
My embedded tools: http://www.geocities.com/englere_geo
Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.