Mail Archives: djgpp/1998/08/11/17:14:02
On 11 Aug 98 at 11:13, Endlisnis wrote:
> On Sun, 9 Aug 1998, George Foot wrote:
> ->> > What the hey? `scanf' is for reading, not writing, so obviously you
> ->> > can't write anything using it. Furthermore, it's unlikely to work right
> ->> > in a graphics mode; you'll have to use Allegro's features for that.
> ->> As long as you are in an 8bbp mode, printf should work fine.
> ->Personally I'd rather not rely on it. It's unpredictable where the
> ->text will be printed, and you don't have as much control.
> You can use 'gotoxy(int,int)' to tell it where to put the text,
> although it has a granularity of 8 horizontal pixels and 16 vertical
> pixels.
`printf' is not documented to cooperate with `gotoxy'. Mixing
functions from conio with functions from stdio is a bad idea in
general, simply because they're not guaranteed to work together
properly. Just because it seems to work doesn't mean that it will
work on all computers, nor that it will work in future versions of
the djgpp library.
Incidentally, I think the granularity depends upon the font size (so
it could be 8x8, 8x14, 8x16, ...).
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -