delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/07/17:10:11

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to graphically locate text in standard screen terminal mode
Date: Wed, 07 Oct 1998 13:57:12 -0700
Organization: Alcyone Systems
Lines: 25
Message-ID: <361BD5A8.7A82E593@alcyone.com>
References: <199810071239 DOT OAA09566 AT acp3bf DOT physik DOT rwth-aachen DOT de> <361B9CF8 DOT 20D1BBEC AT montana DOT com>
NNTP-Posting-Host: charmaine.alcyone.com
Mime-Version: 1.0
X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.34 i686)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

bowman wrote:

> This short test works for me, both on a pure DOS system, and in a DOS
> window under Win95. Note that you must flush the output to insure the
> string is actually written to the console at the current cursor
> position, and not buffered.

That's because you're lucky.  Different ways of displaying output are
_never_ intended to be used in conjunction with one another; this will
only cause problems in the long run (and if it happens to work on your
system, consider yourself lucky; people who might need to port your code
will get nasty surprises).

stdio does not have any way of positioning the cursor.  conio has gotoxy
for positioning the cursor, and cprintf for printing to the console. 
Calls to gotoxy and printf should never be intermixed in your code.

-- 
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900 
Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com
  San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
          USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE
             \
            / Who shall stand guard to the guards themselves?
           / Juvenal

- Raw text -


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