Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 What to use when I can't use Font.Draw
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jasonlin6868




PostPosted: Mon May 26, 2008 3:42 pm   Post subject: What to use when I can't use Font.Draw

Because of the fact that Font.Draw cannot read real and int numbers therefore I am looking for a command that is common to Font.Draw that can read both numbers and words.
Any suggestion?

Sad
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Mon May 26, 2008 3:45 pm   Post subject: RE:What to use when I can\'t use Font.Draw

Font.Draw (intstr (myInt),...)
jasonlin6868




PostPosted: Mon May 26, 2008 3:59 pm   Post subject: RE:What to use when I can\'t use Font.Draw

Could you explain more specify?
Clayton




PostPosted: Mon May 26, 2008 4:00 pm   Post subject: RE:What to use when I can\'t use Font.Draw

Check out F10 for Font.Draw() and intstr() and realstr(). I think you'll figure it out.
jasonlin6868




PostPosted: Mon May 26, 2008 4:32 pm   Post subject: RE:What to use when I can\'t use Font.Draw

Don't really get it. Do u have to do the realstr() thing outside or inside of the Font.Draw?
CodeMonkey2000




PostPosted: Mon May 26, 2008 4:33 pm   Post subject: RE:What to use when I can\'t use Font.Draw

realstr() takes a real number, and converts it into a string. As Clayton already said, look up intsrt() and realstr() in the Turing help section.
Sean




PostPosted: Mon May 26, 2008 5:34 pm   Post subject: Re: What to use when I can't use Font.Draw

It's inside the Font.Draw where you have the text part which would be the beginning of your Font.Draw parameters.

Turing:


Font.Draw (intstr (variable name), ...)
I Smell Death




PostPosted: Wed May 28, 2008 9:12 am   Post subject: Re: What to use when I can't use Font.Draw

Here's an other sample

Turing:

var rNum:real:=3.14159
var iNum:int:=-2
var fn:int:=Font.New("serif")

Font.Draw("the real number is "+realstr(rNum,1)+" and the integer is "+intstr(iNum),5,5,fn,black)
Font.Free(fn)
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: