Open main menu

CDOT Wiki β

Changes

Project R0.1 20123- OOP344

5 bytes removed, 17:15, 13 October 2012
display() method
This method outputs the C-style, null-terminated string pointed to by str starting at row row and column col of the screen in a field of fieldLen characters. Row value 0 refers to the top row, and column value 0 refers to the left-most column.
 
If the string is longer than fieldLen, your function displays the first fieldLen characters. If the string is shorter than fieldLen, your function displays the portion of the entire string that fits on the screen, followed by enough trailing spaces to fill out the field completely.
 
 
<s>If fieldLen is 0, your function displays the portion of the entire string with no trailing spaces.</s> EDIT: In the video lecture, Fardad explains that if fieldLen is 0, the entire string is displayed.
 
 
Your function positions the cursor after the last character displayed. Your function does not flush the output buffer. The results are undefined if the starting position of the string is not within the dimensions of the screen.