home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19530 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.6 KB  |  39 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!noc.near.net!mv!siia!wje
  3. From: wje@siia.mv.com (Bill Ezell)
  4. Subject: Re: Conversion of BASIC code to "C"
  5. Message-ID: <1993Jan11.123129.7416@siia.mv.com>
  6. Organization: Software Innovations, Inc.
  7. References: <1993Jan8.183821.20711@adobe.com> <1993Jan10.131651.1@csbina.csubak.edu>
  8. Date: Mon, 11 Jan 93 12:31:29 GMT
  9. Lines: 28
  10.  
  11. >In article <1993Jan8.183821.20711@adobe.com>, (Scott Sivi) writes:
  12. >> Does there exist a method or application by which BASIC files can be
  13. >> converted 
  14. >> to "C".
  15. >You probably couldn't even do it by hand unless the BASIC program was 
  16. >completely flowed and never used a GOTO! The way BASIC programmers spaghetti-
  17. >code programs, I doubt it's possible. (I'm assuming you won't use goto in C.
  18. >I wouldn't.)
  19.  
  20. An absurd statement, of course. There are several commercially available
  21. Basic-to-C translators. Some are better than others. Given the enormous
  22. number of Basic variants out there, if you're not using a common and
  23. popular Basic, you might have trouble finding one.
  24. We have one for MS PDS Basic to C.
  25.  
  26. As for never using a goto, there are quite good and practical reasons
  27. for using them. This isn't to say that they should be used with any
  28. regularity, but they can sometimes result in much more readable code.
  29. A prime example is getting to a common error point in a routine that
  30. has deep nesting of conditionals or other control constructs. Also,
  31. many machine-generated C programs use gotos. Ever looked at a yacc parser?
  32.  
  33. wje@siia.mv.com
  34. -- 
  35. ------------------------------
  36. | Bill Ezell                 |
  37. | Software Innovations, Inc. |
  38. | wje@siia.mv.com            |
  39.