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

Username:   Password: 
 RegisterRegister   
 How can I use a string variable inside Font.Draw
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
canmovie




PostPosted: Sat Nov 13, 2010 2:36 pm   Post subject: How can I use a string variable inside Font.Draw

What I'm trying to do should be pretty simple. I first get a name, the I use the name the user input later in my program inside Font.Draw.

Turing:


var font : int := Font.New ("times:70")
var p1name, p2name : string

Put "Enter P1 Name"
get p1name
Put "Enter P2 Name"
get p2name

Font.Draw ("Hello"+ p1name + ". How are you?", 20, 650, font, purple)

Font.Draw ("Hello"+ p2name + ". How are you?", 20, 650, font, purple)

Sponsor
Sponsor
Sponsor
sponsor
TerranceN




PostPosted: Sat Nov 13, 2010 4:03 pm   Post subject: RE:How can I use a string variable inside Font.Draw

You are doing everything right except you are drawing the string outside the window, so you don't see it. Try using a y-coordinate of 100 instead of 650.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: