The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall
Difference between revisions of "Unreal Wiki:Sandbox"
From Unreal Wiki, The Unreal Engine Documentation Site
(testing uscript highlighting) |
|||
Line 8: | Line 8: | ||
* Still ugly, but a bit better: {{concat|[|[{{#replace:a,b,c|,|{{concat|]|], [|[}}}}]|]}} | * Still ugly, but a bit better: {{concat|[|[{{#replace:a,b,c|,|{{concat|]|], [|[}}}}]|]}} | ||
− | <uscript> | + | [http://wiki.beyondunreal.com:8080/w/extensions/uscript.php.gz Current UScript highlighter] |
+ | <uscript line> | ||
class TestCommandlet extends Commandlet; | class TestCommandlet extends Commandlet; | ||
Line 18: | Line 19: | ||
} | } | ||
</uscript> | </uscript> | ||
+ | |||
+ | <source lang=perl> | ||
+ | my $line = <>; | ||
+ | chomd $line; | ||
+ | if ($line =~ /^y/i) { | ||
+ | print "You answered yes!\n"; | ||
+ | } | ||
+ | else { | ||
+ | print "You answered no!\n"; | ||
+ | } | ||
+ | </source> |
Revision as of 00:19, 18 February 2008
Do not edit the area above the separator line, please.
- This correctly replaces, but for obvious reasons doesn't produce links correctly: a, [b]], [c]]
- This doesn't even apply #replace: [[{{#replace:a,b,c|,|]], [[}}]]
- This works, but is very ugly: a, b, c
- Still ugly, but a bit better: a, b, c
-
class TestCommandlet extends Commandlet;
-
-
function int Main(string Args)
-
{
-
DynamicLoadObject(Args, class'Class');
-
-
return 0;
-
}
my $line = <>; chomd $line; if ($line =~ /^y/i) { print "You answered yes!\n"; } else { print "You answered no!\n"; }