With Stata 14 having introduced the ustrregex range of functions, I can optimise performance but allow backwards compatibility with [something like] the code below:
But I do not have multiple versions of Stata to test this code. My questions therefore are:
Code:
if c(stata_version)>=14 { //newer regex replace all command ustrregexra("`markunits'", " +", ",") } else { while (regexm("`markunits'", " +")){ local markunits = regexr("`markunits'", " +", ",") } }
- I am assuming c(version) relates to the version denoted in the version command near the beginning of the ado file and c(stata_version) is the underlying version installed - is this correct
- will the version command at the beginning of the file (in this case 9.1) effect how the ado file interpreter responds to the ustrregexra command, or is the version command simply a way to display an error if the user's version is too old, with no other effects?
Comment