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

Username:   Password: 
 RegisterRegister   
 Problem with Fonts
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
iop




PostPosted: Thu May 20, 2004 1:33 pm   Post subject: Problem with Fonts

I have this program
Quote:
var fontID : int
fontID := Font.New ("Times New Roman:18x12:Bold")
var theDateTime : string
theDateTime := Time.Date
var l, u := 1

var h : int

get h %how high it goes after completeing one row

loop
View.Update
l := l + 1
if l >= maxx then
u := u + h
if u >= maxy then
u := 0
end if
l := 1
end if
Font.Draw (Time.Date, l, u, fontID, black)
delay (10)
cls
end loop


How can I make it so that the User can choose the parameters in
Quote:
fontID := Font.New ("Times New Roman:18x12:Bold")
Sponsor
Sponsor
Sponsor
sponsor
SuperGenius




PostPosted: Thu May 20, 2004 2:40 pm   Post subject: (No subject)

have a string variable called font. Then ask the user to enter parameters seperately like:

code:

put "enter size"
get size
put "enter font type"
get ftype


then add them all together:

code:
font:= "size" + "type"

and then say fontID = (font)

keep in mind that what i've just said is a concept, so you still have to work out the correct syntax and stuff on your own.
iop




PostPosted: Thu May 20, 2004 2:47 pm   Post subject: (No subject)

If you ment
Quote:

var fontID : int
var size, ftype, font : string
put "enter size"
get size
put "enter font type"
get ftype
font := "size" + "type"
fontID := (font)

Then it does not work
SuperGenius




PostPosted: Thu May 20, 2004 2:56 pm   Post subject: (No subject)

SuperGenius wrote:


keep in mind that what i've just said is a concept, so you still have to work out the correct syntax and stuff on your own.


This is not actual code. My idea of helping people is giving them advice and then they do it for themselves. Just collect the parameters and add them into one string and call font.new with your string. just make sure the syntax is right.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: