The iffgetecho() function takes one argument: a character string variable to hold the value returned. The effect is to retrieve the next element in the ``echo buffer''. Any remaining lines in the echo buffer will be shifted down (or popped, as it is often called), and the value of &echo_lines will be decreased by one. The echo buffer will only be filled if the variable &screen_echo is set to 0, which indicates that you intend to handle all text that would be sent to the screen yourself. Since any command may write to the echo buffer, it is recommended that you check the value of &echo_lines and retrieve all ``echo''ed lines after each command.
iffgetecho() will return the real, useful length of the echo string.
character*128 txt(32) double precision xnbuff integer nbuff, j i = iffgetsca('&echo_lines', xnbuff) nbuff = min(32,int(xnbuff)) do 10 j = 1, nbuff il = iffgetecho(txt(j)) print*, ' echo line ', j , ' = ', txt(j)(1:il) 10 continue