I have noticed the following behavior when trying to use the ^length() function:
The following code results in a FAILRULE in the trace log and we do not output the second log entry.
$$testval = ^"~fribble.3.2"
^log(FILE TMP/mylog.txt trying length of $$testval \n)
$$length = ^length($$testval)
^log(FILE TMP/mylog.txt length = $$length\n)
This is the same even if you don’t use a variable. Trying to escape the tilde also does not help (e.g. ^”\~fribble.3.4” )
The following pieces of code work fine:
$$testval = ^"fribble"
^log(FILE TMP/mylog.txt trying length of $$testval \n)
$$length = ^length($$testval)
^log(FILE TMP/mylog.txt length = $$length\n)
$$testval = ^"fribble.3.2"
^log(FILE TMP/mylog.txt trying length of $$testval \n)
$$length = ^length($$testval)
^log(FILE TMP/mylog.txt length = $$length\n)
the tilde does not seem to cause any problems with the ^extract or ^findtext functions.
I ran into this issue while trying to work with %inputrejoinder which has a format of ~topicname.1.3
Is there a workaround for this?