You are supposed to add that piece of code to your program, not run it as stand-alone.
in that code the line:
sets the variable myanim with the handle of the animstrip
in that code the line:
myanim=LoadAnimGif("mygif.gif")
sets the variable myanim with the handle of the animstrip