diff --git a/src/PmTcl/commands/string.pm b/src/PmTcl/commands/string.pm index 90e7e58..b5c498f 100644 --- a/src/PmTcl/commands/string.pm +++ b/src/PmTcl/commands/string.pm @@ -1,4 +1,9 @@ -our sub string($cmd, *@args) { +our sub string(*@args) { + if +@args <1 { + error('wrong # args: should be "string subcommand ?argument ...?"'); + } + my $cmd := @args.shift(); + if $cmd eq 'toupper' { return pir::upcase(@args[0]); } elsif $cmd eq 'compare' { @@ -12,6 +17,8 @@ our sub string($cmd, *@args) { } else { return 1; } + } else { + return 'XXX'; } }