Connecting Tech Pros Worldwide Forums | Help | Site Map

C# to standard C conversion

Liam
Guest
 
Posts: n/a
#1: Nov 16 '05
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

Helge Jensen
Guest
 
Posts: n/a
#2: Nov 16 '05

re: C# to standard C conversion


Liam wrote:[color=blue]
> 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.[/color]

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.
[color=blue]
> Can anyone offer any advice on the feasibility and procedure for
> doing this?[/color]

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?
[color=blue]
> I have not seen their code but there will be no user interface.[/color]

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

--
Helge
David Anton
Guest
 
Posts: n/a
#3: Nov 16 '05

re: C# to standard C conversion


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:
[color=blue]
> 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
>[/color]
stork
Guest
 
Posts: n/a
#4: Nov 16 '05

re: C# to standard C conversion


TJB replied to:
[color=blue]
> 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[/color]
C#[color=blue]
> using one of the programs available (recommendation?) and then[/color]
attempt[color=blue]
> to convert the C# to standard C by hand.[/color]

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.

Marcos Stefanakopolus
Guest
 
Posts: n/a
#5: Nov 16 '05

re: C# to standard C conversion


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" <eng.argonelec@dial.pipex.com> wrote in message
news:5d3df175.0503100311.76ab421@posting.google.co m...[color=blue]
> 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[/color]


Eric
Guest
 
Posts: n/a
#6: Nov 16 '05

re: C# to standard C conversion


Liam wrote:[color=blue]
> 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?[/color]

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