delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/24/21:33:02

From: gautam AT interlog DOT com (Gautam N. Lad)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Question about textout
Date: Sun, 24 Aug 97 22:35:26 GMT
Organization: InterLog Internet Services
Lines: 26
Message-ID: <5tqco1$kf7$1@news.interlog.com>
References: <01bcb08b$19492ce0$cf4f05c3 AT padrino>
NNTP-Posting-Host: ip220-105.cc.interlog.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,
   "moabdib" <moabdib AT arrakis DOT es> wrote:
>with textout i can print string, how can i use to print variables?

You use sprintf(), like so:

char *buf;

sprintf(buf,"His age is: %d",Age);
textout(screen,font,buf,10,10,255);

But I think version 3.0 and higher will have a feature for this type of stuff.  
Currently, Allegro is in WIP stage (for v3.0).
Bye!

****************************************************
* Gautam N. Lad                                    *
*--------------------------------------------------*
*                                                  *
* E-Mail    : gautam AT interlog DOT com                  *
* Website   : http://www.interlog.com/~gautam      *
*                                                  *
* OS/2, DOS/Windows, Graphics Gallery, Software,   *
* Links, Rayzor Editor/2, POV-Ray, TexturEyes,     *
* POV-PAK and lots lots lots more!!!!!!!           *
****************************************************

- Raw text -


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