www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/07/16:00:45

Date: Wed, 7 Oct 1998 21:00:30 +0100 (BST)
From: George Foot <george DOT foot AT merton DOT oxford DOT ac DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: How to graphically locate text in standard screen terminal mode
In-Reply-To: <361B9CF8.20D1BBEC@montana.com>
Message-ID: <Pine.OSF.4.05.9810072058150.31785-100000@sable.ox.ac.uk>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Wed, 7 Oct 1998, bowman wrote:

> Hans-Bernhard Broeker wrote:
> > 
> > This is incorrect. gotoxy() has next to no influence at all on printf().
> 
> #include <stdio.h>
> #include <stdlib.h>
> #include <conio.h>
> 
> 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. 

What a bizarre thing to want to do.  I assume you know that
stdout could easily be sent to a file on disk, or piped into
another program, rather than displayed on the screen.  If you're
designing some sort of user interface and want things put in
certain places, why not use `cprintf' instead of `printf'?
`cprintf' is part of conio, so it is designed to work with
things like `gotoxy' and coloured text.  Plus of course you
don't need to flush anything.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

xu do tavla fo la lojban  --  http://xiron.pc.helsinki.fi/lojban/lojban.html

- Raw text -


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