Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this a Y2K problem?
Message
From
03/01/2000 12:08:55
John Baird
Coatesville, Pennsylvania, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00311693
Message ID:
00311743
Views:
24
>You're running into the trap of misusing SYS(2015) - and then take a look at VFP's rules for valid name formation. VFP's parser expects names to start with an _ or alpha character; you can force past that with name expansion. Why it changed may be involved with how SYS(2015) operates - the value created is dependent on date and time, and as a result, it's probably forming the value differently because you crossed some arbitrary value. Look at SYS(2015) - it doew not return a valid name in the last 8 bytes of the 10 character string - it returns a valid 10 byte name. If your system can't deal with an LFN reliably, the substring of SYS(2015) in and of itself is not a valid means of forming a name.
>
>This is a case where you got away with slop in the past and it bit you squarely on the buttocks. Be glad it didn't grab a more anterior location.



BTW, for your information, those lines of code were taken from a code sample posted by a big-time well-known foxpro programmer. I didn't know why he/she was using the SUBSTR, but I figured he/she knew more than me.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform