From: "guthrie" Newsgroups: comp.os.msdos.djgpp Subject: Thanks guys ..that should do it Date: Tue, 10 Aug 1999 17:48:57 -0300 Organization: NBTel Internet Lines: 39 Message-ID: <7oq37a$it7$1@garnet.nbnet.nb.ca> References: <7op7if$src$1 AT garnet DOT nbnet DOT nb DOT ca> <37B068C0 DOT 6C77 AT ns DOT sympatico DOT ca> NNTP-Posting-Host: pix142166194248.nbtel.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Klaas wrote in message news:37B068C0 DOT 6C77 AT ns DOT sympatico DOT ca... > guthrie wrote: > > > > how can I , if even possible , print a string or char array out to the > > screen using the textout or textout_centre allegro functions? > > > > so far i have only used the functions as follows :: > > > > textout (screen, font , " Rotate Left " , 300 , 125, color1); > > > > using the string like that > > > > but what if i want to use a variable in place of the " Rotate Left " part > > ? > > > > do i have to use char[] or string ?.... i haven't been able to get string > > to work at all and haven't tried the char array yet. > > > > Is this possible or do i have to make a new toextout function? > > > > Thanks > > > > Tony > > In the latest versions of allegro, you can use printf-style formatting. > > So, > text_printf(bmp,font,x,y,color,format string,variables); > > Putting any char[] or char in in the format string spot should yield > your intended result. > > -Mike