1 SUB SMG_GET_CHAR(LONG Row,LONG Col,BYTE Char_code) !---------------------------------------------------------------& ! & ! SMG_GET_CHAR & ! & ! Creation Date: 3-July-1985 & ! Author: Ken Messer & ! Purpose: Get the ASCII value of whatever & ! character occupies a given & ! physical cursor location on a & ! terminal screen & ! & ! 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 RS EXTERNAL LONG FUNCTION SMG$Get_char_at_physical_cursor, & SMG$Set_physical_cursor 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 & ! & !---------------------------------------------------------------& ! First, set the physical cursor on the screen 100 RS = SMG$Set_physical_cursor(Current_pasteboard_id,Row,Col) IF RS AND SS$_Normal = 0 THEN PRINT Get_Error_Message(RS) STOP END IF 200 RS = SMG$Get_char_at_physical_cursor(Current_pasteboard_id,Char_code) IF RS AND SS$_Normal = 0 THEN PRINT Get_Error_Message(RS) STOP END IF 32767 SUBEXIT END SUB