TXL (programming language): Difference between revisions

Content deleted Content added
Blufox (talk | contribs)
Blufox (talk | contribs)
Line 10:
===Examples===
 
====BubbleSort[http://star.itc.it/ricca/swat/SORT/Sort.Txl]====
====Factorial====
%Syntax specification
define program
[repeat number]
end define
 
%Transformation rules
rule main
replace $ [repeat number]
N1 [number] N2 [number] Rest [repeat number]
where
N1 [> N2]
by
N2 N1 Rest
end rule
 
====Factorial [http://star.itc.it/ricca/swatII/Esercizi/factorial.txl]====
%Syntax specification
define program