TI99 Environment

# CALL_GCHAR

Syntax

integer-variable = CALL_GCHAR(row,column)

Description

The GCHAR function reads a character from anywhere on the display screen. The computer returns in integer-variable the ASCII code for the character in the position described by row and column. Row and column are integer expressions. A value of 1 for row indicates the top of the screen. A value of 1 for the column indicates the left side of the screen. Valid values: Row:1 - 24 Column:1 - 32

Example Code

    `Test Gchar with text printed by Display_at() function
    a$="Call_Gchar Test"
    b = fast len(a$)
    display_at(1,1,"Press any key",0)
    display_at(12,1,a$,0)
    for i = 1 to b
       g = CALL_GCHAR(12,i+2)
       display_at(22,1,"Position:"+str$(i)+"   ASCII:" + str$(g) + "  " + chr$(g),0)
       call_colorchar(g,5,1)
       tiwaitkey()
       call_colorchar(g,2,1)
    next i
    display_at(24,1,"Press any key to end",0)
    tiwaitkey()
    end

    Program Explanation:
    The program displays a message in the middle of the screen.  As you press a key, the program checks the characters one by one on row 12,
    where the message is displayed and highlights each character with a different color.
    The GCHAR functions checks the highlighted location and saves the ASCII value of the character detected at that location.
    The program displays the column position being checked, the ASCII value of the character at that position and the character detected.

Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020