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

Username:   Password: 
 RegisterRegister   
 Gettings values to stay on a chart
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2, 3  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
recneps




PostPosted: Sat Jan 31, 2004 9:22 pm   Post subject: (No subject)

I'm not sure if this is right, but you're putting everything, and in my experience, when you put 2 things in different x positions, and same y, they get erased because put makes a huge blank space after the word.
(I didnt have time to check the code, but i think thats whats happening) and thats not very long, ive seen longer posted Smile
Sponsor
Sponsor
Sponsor
sponsor
KawaNinja




PostPosted: Sat Jan 31, 2004 9:35 pm   Post subject: (No subject)

lol... yah i tried spacing out the words on the Y axis by 20 pixels apart, and it still did the same thing... Crying or Very sad why does this have to be so hard when i do it Crying or Very sad
recneps




PostPosted: Sat Jan 31, 2004 9:40 pm   Post subject: (No subject)

try Font.Draw? I think you can use variables with that....
recneps




PostPosted: Sat Jan 31, 2004 9:46 pm   Post subject: (No subject)

here. Font.Draw them using this, where x is your variable to be put, and font is whatever you choose Smile

code:
var x:int:=5
var font:int:=Font.New ("arial:12")
Font.Draw((intstr (x)),100,100,font,7)
KawaNinja




PostPosted: Sat Jan 31, 2004 9:47 pm   Post subject: (No subject)

tried Font.Draw just now... it wont recognize my variable to draw on the chart, because the only thing you can put in the Font.Draw is a text string "put this" not the Font.Draw (rpm,...)
Mad
anything else lol?
recneps




PostPosted: Sat Jan 31, 2004 9:51 pm   Post subject: (No subject)

did you read what i just posted? Smile

var x:int:=5
var font:int:=Font.New ("arial:12")
Font.Draw((intstr (x)),100,100,font,7)


intstr give you your variable (int) and turns it into a string so that font.draw can use it.

(intstr (x)) changes var x to a string. Very Happy
KawaNinja




PostPosted: Sat Jan 31, 2004 9:55 pm   Post subject: (No subject)

aw shit ... lol i totally skipped over that part i never saw it, sorry Embarassed
recneps




PostPosted: Sat Jan 31, 2004 9:55 pm   Post subject: (No subject)

Very Happy You're Welcome.
Sponsor
Sponsor
Sponsor
sponsor
KawaNinja




PostPosted: Sat Jan 31, 2004 10:05 pm   Post subject: (No subject)

OMG ! IT WORKED Very Happy lol... thanks so much man i can finally get on with this program and send it to my friend, thanks tons man!!!
Cervantes




PostPosted: Sun Feb 01, 2004 11:00 am   Post subject: (No subject)

tony wrote:
it would help to see your output code Thinking no need for the full program (cuz if you post a lot of code, not many people will bother reading it). Just the part of the code that has the put statements for your chart.


for future reference... tony was so right, I wasn't inclined in the least to take a look at your code.

btw your sig is WAY too big... you can cut it down so there's just the motorcycle, that's still fairly big, but its toleratable. Confused
McKenzie




PostPosted: Sun Feb 01, 2004 12:17 pm   Post subject: (No subject)

KawaNinja wrote:
when did you teach there?

I taught at D'OC from '95 to '02

By the way the easy answer to your problem, put .. after all of your put statments. (e.g. put speed -> put speed..) I know you already solved it using Font.Draw.
Cervantes




PostPosted: Sun Feb 01, 2004 1:58 pm   Post subject: (No subject)

code:
put "hello"..

that would just make the next put statement go on the next line, does it also make it so that it doesn't fill the rest of the line up with white space?
shorthair




PostPosted: Sun Feb 01, 2004 2:03 pm   Post subject: (No subject)

thats wouldnt put hte next put on hte next line , it would put it on the same line
code:

""..

(..) represents , stay on teh same line , good for getting user input , if your gonna put things on the same line and not use .. , then you should put them from left to right
Cervantes




PostPosted: Sun Feb 01, 2004 2:23 pm   Post subject: (No subject)

oops I didn't mean to say that Doh!
then if you did it like that though, you'd have to do like so
code:
put " bla bla bla                            " ..

calculating the # of spaces in there.

the other way to do it is use locate and put statements so that you start at the end of the column (col not row) and work your way to the front.
McKenzie




PostPosted: Sun Feb 01, 2004 3:12 pm   Post subject: (No subject)

err ... look at the code.
He locates before all of his puts. The result of the .. would be to prevent the \n from clearing off the rest of the line.
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 2 of 3  [ 33 Posts ]
Goto page Previous  1, 2, 3  Next
Jump to:   


Style:  
Search: