Converting Vbasic code to C code

A

Artie Gold

dominant said:
any good tool?



any response would be appreciated
Yes, generically it's called a programmer, sometimes referred
to as a software engineer or developer. Some are tools.

Seriously though, this is not a question about the standard C
programming language, hence off topic here.

Please RTFF.
--ag
 
M

Malcolm

dominant said:
any good tool?
It depends what you want to use the C source for. Generally automated
translaters don't produce human-readable C, nor do they produce particularly
efficient C.
Since you presumably already have a VBasic implementation for your platform,
there's not much advantage in having a C version of your programs.
 
F

Fred L. Kleinschmidt

Malcolm said:
It depends what you want to use the C source for. Generally automated
translaters don't produce human-readable C, nor do they produce particularly
efficient C.
Since you presumably already have a VBasic implementation for your platform,
there's not much advantage in having a C version of your programs.

So, there's no point in bothering with such a conversion for a L:inux,
Unix, or Mac box?
 
M

Malcolm

Fred L. Kleinschmidt said:
So, there's no point in bothering with such a conversion for a L:inux,
Unix, or Mac box?
Firstly you would have to separate out all the MS Windows specific stuff.
Then you would not have to care that your Linux code is not editable or even
readable.
This might be the case - say in a completely debugged chess program written
in Visual Basic. The rules of chess are not going to change, so we can treat
the play_chess function as a black box.
Generally however you would be better off rewriting the whole thing in C
using a human programmer.
 
D

dominant

I see, The program in Vbasic is about some mathematical calculations
regarding some experiements.



Is it easy to do that?
 
J

Joona I Palaste

dominant said:
I see, The program in Vbasic is about some mathematical calculations
regarding some experiements.
Is it easy to do that?

The actual mathematics will be easy to translate. It's the interaction
with the OS (Windows, Linux, ...) where you'll be most likely to have
problems. GUIs, in particular, translate badly, as Linux doesn't support
the Win32 API (for obvious reasons).

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"You have moved your mouse, for these changes to take effect you must shut down
and restart your computer. Do you want to restart your computer now?"
- Karri Kalpio
 
D

dominant

Well, if the program uses forms (Vbasic) then i should make similar
forms in C? Even in a Dos mode?
 
J

Joona I Palaste

dominant said:
Well, if the program uses forms (Vbasic) then i should make similar
forms in C? Even in a Dos mode?

C does not know of "forms" or "Dos mode". C is specified purely in the
terms of an abstract machine. Read your own implementation's manual to
find out about "forms" or "Dos mode".

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"Shh! The maestro is decomposing!"
- Gary Larson
 
T

T.M. Sommers

Joona said:
The actual mathematics will be easy to translate. It's the interaction
with the OS (Windows, Linux, ...) where you'll be most likely to have
problems. GUIs, in particular, translate badly, as Linux doesn't support
the Win32 API (for obvious reasons).

There is Wine: http://www.winehq.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top