Re: A89: Re: Re: A92: Letters and Numbers


[Prev][Next][Index][Thread]

Re: A89: Re: Re: A92: Letters and Numbers




In a message dated 8/6/99 2:15:21 PM Eastern Daylight Time, kaus@cybrzn.com 
writes:

> you need to use str in place of num in the drawstr function.  the drawstr
>  function needs a string (str) to print, not an integer number (num).
>  making str an array is where each character is held.  when you use str
>  without an index value, it becomes a pointer to the beginning of the 
string.
>  that is what is msot often used in string handling.
>  
>  --kaus

Thanks, this is helpful too.  so l'm guessing that sprintf(str,"%d",num) 
converts the %decimal number, num, to a string, str, to be displayed by 
DrawStr(0,0,str,4).  Also l guess what l'm asking is, what is the 14 for?  
why not another number?  or is that just in case num has more than 13 (plus a 
null) digits?  Does this mean that if all cells of str is not filled by that 
function that they won't be displayed?
Thanks

>  > In a message dated 8/6/99 11:04:46 AM Eastern Daylight Time,
>  > dysup@coah1.telmex.net.mx writes:
>  >
>  > > > >  _main()
>  > >  > >  {
>  > >  > >       char str[14];
>  > >  > >       int num = 245;
>  > >  > >
>  > >  > >      sprintf(str,"%d",num);
>  > >  > >      DrawStr(0,0,num,4);
>  > >  > >  };