home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / lang / basic / 867 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.1 KB  |  40 lines

  1. Newsgroups: alt.lang.basic
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!phage!boutell
  3. From: boutell@isis.cshl.org (Tom Boutell)
  4. Subject: Re: Calling QuickC from QuickBasic
  5. Message-ID: <Bxz8Kx.BF8@phage.cshl.org>
  6. Sender: news@phage.cshl.org
  7. Organization: Cold Spring Harbor Labs
  8. References: <922112112145@ibm3090.bham.ac.uk>
  9. Date: Thu, 19 Nov 1992 18:55:45 GMT
  10. Lines: 28
  11.  
  12. My mailer didn't know you. Here we go again:
  13.  
  14.  
  15. Interesting situation. Your problem is making sure that C and Quickbasic
  16. both "know" what mode you're in so they'll execute the right code for
  17. the mode. A cheap nasty solution:
  18.  
  19. At the beginning, when you set the graphics mode, do it in both:
  20.  
  21. SCREEN N   (in Quickbasic; clears the screen and sets graphics mode
  22.                         so your code will know about it)
  23. call croutine()
  24.  
  25.  
  26. void croutine() {
  27.     _setupvideo(...same mode for Quick C...);
  28. }
  29.  
  30. So the screen gets cleared twice, which is a waste but not noticeable if it
  31. only happens when the program first starts up, and now both libraries
  32. think they're in the same mode.
  33.  
  34. -T
  35.  
  36. -- 
  37. Tom Boutell, boutell@cshl.org
  38.  
  39. Clausthaler is the best non - alcoholic beer in the known universe.
  40.