delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/09/10:30:52

From: Charles Krug <charles AT mail DOT pentek DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Basic to C
Date: Tue, 09 Feb 1999 09:51:12 -0500
Organization: Pentek Corporation
Lines: 46
Message-ID: <36C04B60.5D97F6CE@mail.pentek.com>
References: <Pine DOT BSI DOT 3 DOT 95 DOT 990208115042 DOT 21882A-100000 AT cue DOT satnet DOT net>
NNTP-Posting-Host: mail.pentek.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.5 [en] (WinNT; U)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Ronald Patino G." wrote:

> Hi
> Do you guys know where can i find a program to translate programs
> written in basic  to c ??

Try Bob Stout's snippets page (www.snippets.org).  IIRC, he has one
of those there.  How many lines of code are we talking about?  What
does the program do?  Depending on how comfortable you are with C and
how long the program is, you might be better off doing it by hand.

For example:

print "Hello, World"

translates easily:

#include <stdio>
int main()
{
    printf("Hello, World\n");
}

A for loop:

for i = 1000 to 0 step -1

for (i = 1000; i >= 0; --i)

But I wouldn't want to to that to 10000 lines of source.

Once you get into graphics or console I/O things, you're on your own.



> Thanks in advance
> Ronald

--
Charles Krug, Jr.
Application Engineer
Pentek Corp
1 Park Way
Upper Saddle River, NJ 07458


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019