Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C to Basic converter but I do not understand how to feed the converter

Status
Not open for further replies.

GNorth

Technical User
Feb 3, 2001
3
AU
The converting script from C to Basic:


c2bas.vbs is the name of script after unzipping.

c2bas.vbs renames the input C source code *.c to *.bas source code.

But for some reasons the content of the *.bas remains blank

I am not familiar enough with VBS scripting to understand what's wrong.
Below is part of the source code of c2bas.vbs
Code:
     Option Explicit
    '
    ' ============================================
    ' ConvertC2BAS Script
    ' Developed by Rick Coogle
.....etc (280 linjes of code).

I am not feeding my C source code correctly to this Converting_Script.

This is the source code I am trying to convert to Basic ( any Basic)

If someone can give me some direction how to feed the C source code correctly, this would be appreciated?

Does anyone know of an other C to Basic(any Basic) converter?

Guy
 
There are several issues here!

1. Check out lines 7 and 8 of the file c2bas.vbs
' PURPOSE: To convert C style constants and UDT declarations
' to standard VB syntax
The script is to convert C style CONSTANTS (not PROGRAMS)

2. In general the structure of different languages is sufficiently different for meaningful machine translation from a low-level language (such as C) to a higher level language (such as VB) to be near impossible

3. It will probably be easier for you to learn C than to attempt an auto-translater - the C program that you reference is quite trivial. Start from here:

4. The script that you reference is VBSCript, not VB6. If you haven't spotted the difference, you may have quite a steep learning curve ahead!

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Thank johnwm

Sorry for posting to the VB forum instead of the VBS forum. Searched VBS form but I could not find it.

Excelent results with your Google URL

>>It will probably be easier for you to learn C than to >>attempt an auto-translater

I subscribed to VTC C and I am now learning C.

Guy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top