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

Username:   Password: 
 RegisterRegister   
 font help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
skier




PostPosted: Wed Nov 03, 2004 5:04 pm   Post subject: font help

alright im trying to make this work grow until it gets to size 50. heres what i have so far but i dont work, any help?



code:

setscreen ("graphics: 600,450,offscreenonly")

var font1 : int
var big : int
big := 10

Draw.FillBox (0, 0, 600, 450, 7)
loop

    font1 := Font.New ("Snap ITC", : big)
    big := big + 1
   
    Draw.Text ("PACMAN", 200, 300, font1, 12)
   
    Time.Delay (10)
    View.Update
end loop
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Wed Nov 03, 2004 5:26 pm   Post subject: (No subject)

Change the line to:
code:
font1 := Font.New ("Snap ITC :" + intstr (big))

But remember that you haven't made any checks to make it stop after 50. Also, you should call Font.Free on your font somewhere at the end of the loop.
skier




PostPosted: Wed Nov 03, 2004 5:33 pm   Post subject: (No subject)

but hten the work becomesun readable
Mazer




PostPosted: Wed Nov 03, 2004 5:39 pm   Post subject: (No subject)

So clear the screen.
code:

cls
skier




PostPosted: Wed Nov 03, 2004 5:44 pm   Post subject: (No subject)

ill bet that i look really dumb, dont i
skier




PostPosted: Wed Nov 03, 2004 5:54 pm   Post subject: (No subject)

quick question;
what does "intstr" actually do?
Mazer




PostPosted: Wed Nov 03, 2004 6:21 pm   Post subject: (No subject)

Don't worry, I've seen dumber. Wink

intstr is a function that takes an integer as an input and returns a string.
An example:
code:
put intstr(8008135)

Takes the integer 8008135 and returns the string "8008135".

If you want to know what a function/procedure does, just type it into the turing editor and hit F8 to see what parameters it takes and what it's output type is (see status bar), or hit F9 to open the turing reference with more in depth information about it.
skier




PostPosted: Wed Nov 03, 2004 6:30 pm   Post subject: (No subject)

thanks for the help
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: