Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Printer Properties Beta Testers Needed
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01050441
Message ID:
01050971
Views:
18
>>Yes, you're right. I shouldn't be using sys(3), but I'll use SUBSTR(SYS(2015),3) as Tore suggests. SYS(2015) returns a string starting with an underscore followed by a number, which is why you need to start with the third character, which is a letter.
>
>A file name can start with a digit and 3rd character in the string returned by SYS(2015) may be a digit also.

So what are you suggesting? That I don't need to use SUBSTR() at all? FWIW, the help file says this about SYS(3):

"SYS(3) returns file names that begin with numbers. If your code uses SYS(3) with commands such as CREATE TABLE, CREATE CURSOR, SELECT INTO CURSOR, the code may fail because FoxPro cursors or alias names cannot begin with numbers. You can use SYS(2015) instead."

I think this is a bit misleading because CREATE TABLE won't fail if the name starts with a number. I'm not using this name as an alias, so I suppose it doesn't really matter if it starts with a number or not.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform