Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How often is SYS(2015) changed?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01521892
Message ID:
01522777
Vues:
138
Probably better to PADR() or PADL() with 0's than use a format string that injects spaces. That just looks weird. :-)

I think I'd use
lcId = SYS(2015) + PADL(Application.ThreadId,5,"0")
Actually I think you might need 6 characters - I frequently get 5 digit values in the upper 5 digit range. In theory threadID is a DWORD so that number COULD get VERY large. In reality though I've never seen a 6 digit threadID - anyone?

+++ Rick ---

><snip>
>>
>>lcId = SYS(2015)+TRANS(Application.ThreadId)
>>
>>
>>Unfortunately this also changes the size of the id and because the value isn't a fixed length it's harder to optmize the id. ThreadIds can be up to 5 digits wide.
>>
>
>You can easily make it a fixed length.
>
>
>lcId = SYS(2015) + TRANSFORM(Application.ThreadId, "@L 99999")
>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform