Changes

Jump to: navigation, search

OOP344 Assignment One

2 bytes added, 12:48, 4 October 2009
IsTextEditor:
====IsTextEditor:====
If IsTextEditor is true, then it means that the function is being used to edit a text by editing one line of the text at a time. In this case, shifting a line to the left or right should not only cause the editing line to be shifted, but also the rest of the lines in the text. To do this, io_edit should let the calling function take care of shifting instead of doing it by itself. Since shifting essentially means modifying “*offset” when “IsTextEditor” is true, and that there are times when you find that “*offset” needs to be modified, you should terminate the function instead. With termination, the function should return the terminating key.  The only exception is when upon the beginning of the execution of io_edit, when validating *offset, make sure to correct the offset before returning the default value of key.
''when IsTextEditor is true, and Escape is hit do not abort the editing but simply terminate the function returning the Escape key.''

Navigation menu