scandum / tintin

TinTin++, aka tt++, is an extensible console MUD client.

Home Page:https://tintin.mudhalla.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Difficult to understand `#regex` control flow in `#func`.

dzpao opened this issue · comments

commented
2023-02-16 00:05:16 INPUT: #func foo {#regex {foo} {foo} {#echo OK; #return ok} {#echo ERROR; #return error}; #return what???}; #show @foo{}
#OK. FUNCTION {foo} NOW TRIGGERS {#regex {foo} {foo} {#echo OK; #return ok} {#echo ERROR; #return error}; #return what???}.
OK
what???

From #help regex:

         The #regex command is not a proper statement like #if, when using
         #return or #break in the {true} argument it won't terminate any loop
         the #regex command is nested within.
commented

Okay. I accept that statement.