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

Username:   Password: 
 RegisterRegister   
 is there any way to make this smaller?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
n00b.skillz




PostPosted: Wed Dec 20, 2006 11:02 am   Post subject: is there any way to make this smaller?

okay well i was just wondering if there is a more efficient way to make a user input display into another font (other than default in real time (as they are typing it in) than this code that i have found on one of the forums
code:

function gets (xpos, ypos, font, clr : int) : string
    var a : string (1)
    var word : string := ""
    loop
        getch (a)
        exit when a = '\n'
        if word ~= "" and ord (a) = 8 then
            word := word (1 .. * -1)
        else
            if a ~= "\b" then
                word += a
            end if
        end if
        cls
        Font.Draw (word, xpos, ypos, font, clr)
    end loop
    result word
end gets

var name : string := ""
put "Please enter your name"
name := gets (12,375, Font.New ("times new roman:10" ),red)
Sponsor
Sponsor
Sponsor
sponsor
ericfourfour




PostPosted: Wed Dec 20, 2006 3:15 pm   Post subject: (No subject)

If you want a more efficient way you can always try my getter.
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: