Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Highlight one line of a listing at a time in LaTeX
\only<1> {\emphline{1-5} {6} {7-15} {potencia.f95}}
\only<2> {\emphline{1-6} {7} {8-15} {potencia.f95}}
\only<3> {\emphline{1-8} {9} {10-15}{potencia.f95}}
\only<4> {\emphline{1-9} {10}{11-15}{potencia.f95}}
\only<5> {\emphline{1-10}{11}{12-15}{potencia.f95}}
\only<6> {\emphline{1-9} {10}{11-15}{potencia.f95}}
\only<7> {\emphline{1-10}{11}{12-15}{potencia.f95}}
\only<8> {\emphline{1-9} {10}{11-15}{potencia.f95}}
\only<9> {\emphline{1-10}{11}{12-15}{potencia.f95}}
\only<10>{\emphline{1-9} {10}{11-15}{potencia.f95}}
program potencia
implicit none
real :: base, resultado
integer :: exponente, i
read *, base
read *, exponente
resultado = 1
do i = 1, exponente
resultado = resultado * base
end do
print *, resultado
end program potencia

This comment has been minimized.

Show comment Hide comment

robertoaloi Jul 27, 2012

Here's how I automated the solution a bit by using a counter:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment