1 SUB SMG_DELETE_CHARS(LONG Number_chars,LONG Row,LONG Col, & LONG Vir_disp_num) !---------------------------------------------------------------& ! & ! SMG_DELETE_CHARS & ! & ! Creation Date: 3-July-1985 & ! Author: Ken Messer & ! Purpose: Delete characters from a line & ! in 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" DECLARE LONG Return_status, & Display_width EXTERNAL LONG FUNCTION SMG$Delete_Chars, & SMG$Get_Display_Attr EXTERNAL LONG CONSTANT SS$_Normal EXTERNAL STRING FUNCTION Get_Error_Message(LONG) !---------------------------------------------------------------& ! & ! M a i n P r o g r a m L o g i c & ! & !---------------------------------------------------------------& ! If user specifies too many characters (i.e. - tries to delete ! characters that don't exist), modify the amount to the maximum ! number available Return_status = SMG$Get_Display_Attr(Display_id(Vir_disp_num),, & Display_width,,,) IF Return_status AND SS$_Normal = 0 THEN PRINT Get_Error_Message(Return_status) STOP END IF Number_chars = Display_width - Col + 1 & IF Number_chars > Display_width - Col + 1 ! Delete the specified characters Return_status = SMG$Delete_Chars(Display_id(Vir_disp_num), & Number_chars,Row,Col) ! Check for error IF Return_status AND SS$_Normal = 0 THEN PRINT Get_Error_Message(Return_status) STOP END IF SUBEXIT END SUB