Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why can I store more than 254 chars to a memory variable
Message
De
16/05/2001 15:43:13
 
 
À
16/05/2001 14:47:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00507998
Message ID:
00508068
Vues:
17
Craig,

Maybe it's me, but I found the help text on this (Overview of the language/data and field types), to be misleading.

Thanks for your help.

>>I wanted to store unlimited text in a property of an object. I thought I wouldn't be able to do it. I thought that the limit of a character variable was 254 chars. (As per VFP 6 help) But upon testing I found that I can issue:
>>cvar=replicate('x'+254)+replicate('y'+254)
>>?type('cvar') && returns C
>>?cvar && shows that all 508 chars are stored.
>>I thought there would be truncation
>>
>>I can also issue something like:
>>this.myproperty=replicate('x'+254)+replicate('y'+254)
>>or
>>this.myproperty=mytable.mymemofield
>>?type('this.myproperty') && returns C not M
>>without a problem
>>
>>Was this a limitation in earlier (prior to 6) version of VFP, or could you always do this?
>>
>>TIA
>
>
>254 is the maximum length for a character field. A character variable can be 2 billion bytes.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform