Print itself
Create a program, which prints it's source code to the stdout!
Print itself is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
Furor
A very short solution, using some special features of Furor: <lang Furor> "#s sto selfstring QUOTE @selfstring dup print QUOTE NL printnl end { „selfstring” }"
- s sto selfstring QUOTE @selfstring dup print QUOTE NL printnl end { „selfstring” }
</lang> And behold, here is a more complex but "traditional" solution of this famous task, solved by 3 loops: <lang Furor>
- g §vége §eleje - tokensize / sto maxlines
- s
7 {| {} §eleje[] printnl |}
@maxlines {| {} §eleje[] QUOTE print QUOTE NL |}
7 @maxlines {|| {} §eleje[] printnl |} end eleje: "#g §vége §eleje - tokensize / sto maxlines" "#s" "7 {| {} §eleje[] printnl |}" " @maxlines {| {} §eleje[] QUOTE print QUOTE NL |}" "7 @maxlines {|| {} §eleje[] printnl |}" "end" "eleje:" "vége:" "{ „selfstring” }" "{ „maxlines” }" vége: { „selfstring” } { „maxlines” } </lang>