Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SYS(3) & VARIABLES
Message
De
10/07/2001 12:10:16
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
 
 
À
10/07/2001 11:57:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00528678
Message ID:
00528702
Vues:
20
>>OK thanks.
>
>From the manual:
>
>"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."
>
>"The name that SYS(2015) returns is created from the system date and system time. Calling SYS(2015) more than once during the same millisecond interval will return a unique character string."
>
>Additional notes:
>
  • sys(2015) is 10 characters instead of 8. This may affect some of your procedures.
    >
  • sys(2015) always starts with a character. Not so sys(3).
    >
    >Hilmar.

    A word of caution -
    Yes, sys(2015) always starts with a character, but SUBSTR(SYS(2015), 3, 10) does not. It will generate valid file names, but it can generate invalid eight character variable, field, or table aliases. If you want an eight character unique name use "_" + SUBSTR(SYS(2015), 4, 10) instead.
    David.
  • Précédent
    Suivant
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform