smcvey / tcz

The Chatting Zone Mud Server
GNU General Public License v2.0
6 stars 3 forks source link

@Case #21

Closed noahmanderson closed 4 years ago

noahmanderson commented 4 years ago

I am feeling pretty good about these changes. Tested thoroughly with the following two commands and tried multiple solutions:

Casetest(#66 C^) Type: Compound command; Building Quota used: 10. Owner: Spite(#9 PWBPaybM). Flags: Censored. Size: 746 bytes (477 bytes compressed (36.1%)) Key: UNLOCKED.

----------------------------- Commands executed by compound command ----------------------------- [001] @case $3 do [002] single:@echo Single value. [003] one,two,three:@echo Value '%w%l$6%x'. [004] AA-ZZZ:@echo Exact range '%w%l$6%c-%w%l$7%x'. [005] B-P:@echo Exact range '%w%l$6%c-%w%l$7%x'. [006] 0..9:@echo Exact range '%w%l$6%c..%w%l$7%x'. [007] Q->Z:@echo Prefix range '%w%l$6%c->%w%l$7%x'. [008] and:@echo Contains the wildcard '%w%l$6%x'. [009] a*:@echo Begins with the wildcard '%w%l$6%x'. [010] block:@begin [011] @echo %w%l>>> %xThis demonstrates executing [012] @echo %w%l>>> %xa block of commands. [013] @end [014] DEFAULT:@echo %r%lNothing matched. [015] @end

Casetest3.1(#54 C^) Type: Compound command; Building Quota used: 10. Owner: Spite(#9 PWBPaybM). Flags: Censored. Size: 413 bytes (319 bytes compressed (22.8%)) Key: UNLOCKED.

----------------------------- Commands executed by compound command ----------------------------- [001] @case $3 do [002] a: @begin [003] @echo a [004] @end [005]
[006] b: @begin [007] @temp line = b [008] @echo b [009] @end [010]
[011] c: @begin [012] @echo c [013] @end [014]
[015] d: @begin [016] @echo d [017] @end [018]
[019] DEFAULT: @begin [020] @echo DEFAULT [021] @end [022]
[023] DEFAULT: @echo 2nd default [024]
[025] @end

[12:00.16 am]-> casetest3.1 a a [12:00.19 am]-> casetest3.1 b b [12:00.20 am]-> casetest3.1 c c [12:00.20 am]-> casetest3.1 d d [12:00.21 am]-> casetest3.1 DEFAULT [12:00.22 am]-> casetest3.1 default DEFAULT

[12:03.25 am]-> casetest one Value 'one'. [12:04.33 am]-> casetest three Value 'three'. [12:04.36 am]-> casetest b Exact range 'B-P'. [12:04.39 am]-> casetest u Prefix range 'Q->Z'. [12:04.49 am]-> casetest block

This demonstrates executing a block of commands. [12:04.51 am]-> casetest default Nothing matched. [12:04.55 am]-> casetest Nothing matched. [12:04.58 am]-> casetest 3 Exact range '0..9'. [12:05.05 am]-> casetest cc Exact range 'AA-ZZZ'. [12:05.08 am]->