Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with SUBSTR(SYS(2015),3,10)
Message
From
14/07/2003 02:21:01
 
 
To
14/07/2003 01:09:46
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00809725
Message ID:
00809733
Views:
28
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>In the VFP6.0 help for SYS(3) it states the following:
>
>
>SYS(3) may return a non-unique name when issued successionally on a fast
>computer. Use SUBSTR(SYS(2015), 3, 10) to create unique, legal eight
>character file name.
>
>
>I use the above technique to create a string which in turns is used as the name for a cursor. As of Today ( 14 July ) using the above method returns a string that starts with 0 ( zero ) which causes an error when creating the cursor as cursor names don't seem to be allowed to start with a numeric. I've worked around the problem by adding a non numeric character to the start of the string and it works fine.
>
>I assume the problem has something to do with not being allowed an alias that starts with a numeric.
>
>Regards,

Gavin you can also just use SYS(2015) which always produces 10 char valid file names that start with an underscore. No changes required.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform