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

Message-ID: <361B9CF8.20D1BBEC@montana.com>
Date: Wed, 07 Oct 1998 10:55:21 -0600
From: bowman <bowman AT montana DOT com>
X-Mailer: Mozilla 4.5b2 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: How to graphically locate text in standard screen terminal mode
References: <199810071239 DOT OAA09566 AT acp3bf DOT physik DOT rwth-aachen DOT de>
Reply-To: djgpp AT delorie DOT com


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. 

---------------------------------  test.c
----------------------------------

int main(void)
{
	gotoxy(1,1);
	printf("Hello");
	fflush(stdout);
	gotoxy(40,12);
	printf("World");
	fflush(stdout);
	gotoxy(65,23);
	fflush(stdout);
	printf("!!!");
	return 0;
}

- Raw text -


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