| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ASCIIFileClass > AsciiFileClass Methods >====== FormatLine (a virtual to format text) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[asciifileclass functional organization expected use.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[getdosfilename let end user select file .htm|{{btn_next_n.gif|Next page}}]] | | || **FormatLine( **//line //[//, line number //]// //**), PROTECTED, VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} | **FormatLine** | A virtual placeholder method to format text. | | //line// | The label of the STRING variable containing the text to reformat. | | //line number// | An integer constant, variable, EQUATE or expression that contains the offset or position of the line of text being formatted. If omitted, FormatLine operates on the current line. | The **FormatLine **method is a virtual placeholder method to reformat text prior to display at runtime. **Implementation:** The FormatLine method is a placeholder for derived classes. It provides an easy way for you to reformat the text prior to display. The GetLine method calls the FormatLine method. **Example:** ** INCLUDE('ABASCII.INC')                     !declare ASCIIViewerClass** **MyViewer   CLASS(AsciiViewerClass),TYPE     !derive MyViewer class** **FormatLine  PROCEDURE(*STRING),VIRTUAL      !prototype virtual FormatLine** **           END** **Viewer    MyViewer,THREAD                   !declare Viewer object** **AsciiFile   FILE,DRIVER('ASCII'),NAME('MyText'),PRE(A1),THREAD** **RECORD       RECORD,PRE()** **Line          STRING(255)** **             END** **            END** ** CODE** ** !program code** **MyViewer.****FormatLine**** PROCEDURE(*STRING line)  !called by ASCIIViewerClass** ** CODE** ** line = line[1:5]'  '&line[5:55]             !reformat the text** **See Also:** [[getline return line of text .htm|GetLine]]