//    Instruction Example :     long text.persistence.get (objectid)


        screen.resolution.set (512,384)

        screen.set (BACK)
          pattern.display ("avo\bubble.gif")
        screen.end ()

        @text = text.create ("Hello World")
        text.display (@text,CENTER,CENTER)

        screen.set (FRONT)
          text.display ("Press a key to set the persistence of the text.",CENTER,10)
          text.color.stack (COLOR_RED)
          text.display ("Press ESCAPE to exit.",CENTER,350)
        screen.end ()

        repeat ()

          !angle+=1.5
          text.position.set (@text,210+80*number.sin.get (!angle),170+80*number.cos.get (!angle))

          if (keyboard.get ())
          keyboard.set (OFF)

            %i+=1
            switch (%i mod 3)
              case (0)
                text.persistence.set (@text,OFF)
              case (1)
                text.persistence.set (@text,ON)
              case (2)
                text.persistence.set (@text,PERSISTENCE_TRAILS)
            end switch ()

            screen.set (FRONT)
              switch (text.persistence.get (@text))
                case (OFF)
                  text.display ("The persistence of the text is : OFF   ",CENTER,30)
                case (ON)
                  text.display ("The persistence of the text is : ON    ",CENTER,30)
                case (PERSISTENCE_TRAILS)
                  text.display ("The persistence of the text is : TRAILS",CENTER,30)
              end switch ()
            screen.end ()

          endif ()

          time.wait (0.005)

        until (keyboard.get ()==KEY_ESCAPE)

        script.stop ()