RCRPG/Tcl: Difference between revisions

m
Fixed syntax highlighting.
m (Add SMW link)
m (Fixed syntax highlighting.)
 
Line 2:
This [[Tcl]] version of [[RCRPG]] was typed and tested on a cellphone, so pardon my brevity.
 
<langsyntaxhighlight Tcllang="tcl">#!/usr/bin/env tclsh
proc help args {
return "RosettaCode 3D single user dungeon in Tcl. Type a command:
Line 153:
}
 
main $argv</langsyntaxhighlight>
 
==Alternative Version==
Line 165:
lappend [@ my items &] teacup ;#-- returns a reference
 
<langsyntaxhighlight Tcllang="tcl">proc help args {
return "RosettaCode 3D single-user dungeon in Tcl. Type a command:
e(ast), s(outh), n(orth), w(est), u(p), d(own)
Line 327:
regsub {(.+),} [join $tmp ", "] {\1, and}
}
main $argv</langsyntaxhighlight>
9,476

edits