TEXTIO

An Example


USE STD.TEXTIO.ALL;
TYPE state IS (reset, good);
PROCEDURE display_state (current_state : IN state) IS
    VARIABLE k : LINE;
    FILE flush : TEXT IS OUT "/dev/tty";
    VARIABLE state_string : STRING (1 to 7);
BEGIN
    CASE current_state IS 
        WHEN reset => state_string := "reset ";
        WHEN good => state_string := "good ";
    END CASE;
    WRITE (k, state_string, LEFT, 7);
    WRITELINE (flush, k);
END display_state;