General information
Category:
Coding, syntax & commands
Without wanting to appear critical here, but your initial description of what the code does
>>Finds the substring that starts with // not prefixed immediately by :, up to the first terminating '.' and substitutes WinNT://first matching string. Using it to start building an ADSI call...
does not match the comments
>* Expression - find first occurance of // not preceded by :, trailed by at least one non-immediate . followed by a wordvalue sequence
>* allow any valid file constructor character set for a machine name; no whitespace
>* limits - lead character can't be -; in theory, whitespace is permitted in a machine name
the comments imply that the match is up to the wordvalue after the last ., your initial description says it stops at the first .
Now, which is right (I believe the comment, from my small knowledge of reg.Exprs mainly through AWK) & what did you intend for it to do, only you know that - this is part of the problem I find with comments in OPC. Very often the comment may detail what the code actually does, rather than what it was intended to do, without knowledge of both (& often when maintaining old code, the design spec isn't available & arguably for properly commented code needn't be), maintaining code is very difficult.
Regards
Paul
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only