Return to test-input.in CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / libpdel / tmpl / test |
1.1 ! misho 1: ! 2: @define("nl") ! 3: @cat("\n") ! 4: @enddef ! 5: ! 6: @define("nop") ! 7: @cat("\n") ! 8: @enddef ! 9: ! 10: @define("readit") ! 11: @output(@cat("Please enter your ", @get("arg1"), ": ")) ! 12: @flush() ! 13: @set(@get("arg1"), @input(@get("arg2"))) ! 14: @if(@get("arg2")) ! 15: @nl() ! 16: @endif ! 17: @enddef ! 18: ! 19: @nop()Hello, this is a template input test.@nl() ! 20: ! 21: @while("1") ! 22: ! 23: @nl() ! 24: @readit("username", "0") ! 25: ! 26: @nop()Hello @get("username"), nice to see you.@nl() ! 27: ! 28: @nl() ! 29: @readit("password", "1") ! 30: ! 31: @if(@not(@equal(@get("username"), @get("password")))) ! 32: @nop()Oops, your password and username must be the same.@nl() ! 33: @nop()Please try again.@nl() ! 34: @continue ! 35: @endif ! 36: @nop()OK, @get("username"), the test is over.@nl() ! 37: @nl() ! 38: @break ! 39: @endwhile ! 40: