Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Continued comments ...
Message
From
22/03/2000 11:06:39
Paul Frost
Instem Computer Systems Ltd
Stone, United Kingdom
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00348010
Message ID:
00348925
Views:
35
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
Map
View

Click here to load this message in the networking platform