1 SUB SMG_READ_FROM_DISPLAY(LONG Row,STRING Term_string, & STRING Returned_string,BYTE Virtual_display_number) !---------------------------------------------------------------& ! & ! SMG_READ_FROM_DISPLAY & ! & ! Creation Date: 2-December-1985 & ! Author: Ken Messer & ! Purpose: Read previously written text & ! from a virtual display. & ! & ! Modification history & ! & ! Date Description of change(s) & ! & !---------------------------------------------------------------& ! & ! Copyright (c) 1985 - Ken Messer, Allied Electronics, Inc., & ! 401 E. 8th St., Ft. Worth, TX 76102 & ! & ! This software may be copied and distributed freely to anyone & ! for non-commerical use provided that this copyright notice is & ! included. & !---------------------------------------------------------------& OPTION TYPE = INTEGER, SIZE = INTEGER LONG %include "SMG$LIBRARY:SMG.DFN" EXTERNAL LONG FUNCTION SMG$Read_From_Display EXTERNAL LONG CONSTANT SS$_Normal DECLARE LONG RS EXTERNAL STRING FUNCTION Get_Error_Message(LONG) !---------------------------------------------------------------& ! & ! M a i n P r o g r a m L o g i c & ! & !---------------------------------------------------------------& ! determine what the user wants to do: ! if row > 0, use row and ignore terminator string - all text ! on that row will be returned ! if row = 0, the current row/column position is used. The ! terminator string will be used to determine the starting ! column position and all text from that column to the last ! column will be returned - if the terminator is not found, ! all text on the line will be returned IF Row > 0 THEN RS = SMG$Read_From_Display(Display_ID(Virtual_display_number), & Returned_string,,Row) ELSE RS = SMG$Read_From_Display(Display_ID(Virtual_display_number), & Returned_string,Term_string,) END IF ! Check for error IF RS AND SS$_Normal = 0 THEN PRINT Get_Error_Message(RS) STOP END IF 32767 SUBEXIT END SUB