Computer Science Canada How to make the text is right-justified? |
Author: | 8749236 [ Sun Feb 20, 2011 9:58 am ] | ||
Post subject: | How to make the text is right-justified? | ||
What is it you are trying to achieve? I'm trying to make the text is start from right side, which is right-justified... What is the problem you are having? the problem i have is i don't know how to make the text right-justified Describe what you have tried to solve this problem i have tried the way the Turing Online Manual told me but it is not working.. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) This is the program i need make it right-justified..
Please specify what version of Turing you are using Turing 4.1.1 |
Author: | Zren [ Sun Feb 20, 2011 12:23 pm ] | ||
Post subject: | RE:How to make the text is right-justified? | ||
|
Author: | 8749236 [ Mon Feb 21, 2011 11:06 pm ] |
Post subject: | RE:How to make the text is right-justified? |
en, tried, not working properly, the second line replaced the first line.. |
Author: | Zren [ Mon Feb 21, 2011 11:31 pm ] |
Post subject: | RE:How to make the text is right-justified? |
Then you need to remember which row your writing to, and increment it as you write a line. Line 1: Dad Line 2: Jeff Line 3: Donald locate(row, column) |
Author: | unoho [ Tue Feb 22, 2011 11:28 am ] |
Post subject: | RE:How to make the text is right-justified? |
i had a similar assignment where we had to make right, left, center and justify. Note that i did it in C++, so it might or might not be same approach. so input the max number of character per line and put it in a temporary string. then take the length of the line and using a forloop, u would just print extra white space at the beginning. Now you might ask, how would i know how many spaces i need at the front. That is the number of max characters - length of the string on that line. |
Author: | TokenHerbz [ Tue Feb 22, 2011 4:20 pm ] | ||
Post subject: | RE:How to make the text is right-justified? | ||
You can put these into more function programing functions/procs to use. but I would suggest using Font.Draw
|