Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My string is longer than 255 characters!!
Message
 
 
À
26/08/2002 10:49:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00693653
Message ID:
00693774
Vues:
15
Joe,

A string constant is limited to 255 characters:
lcStr = "there can not be more than 255 characters in here ..."
A string memvar is limited only by memory.
lcStr = replicate( "abcde", 10000 )
? len( lcStr )
Don't macro expand your string, and parse it apart in your function.
nReturn = MyFunc( table.memo )

function MyFunc( lcStr )
local laItems[1], i, n

n = alines( laItems, chrtran( lcStr, ',', chr(13) ) )
for i = 1 to n
   ... do something to each item
endfor
>I'm working in a VFP 5.0 application and attempting to assign a table's memo field to a string, which I then pass along to one of my form's procedures using the following command:
>
>nReturn = (&lcBEFORE)
>
>where lnBEFORE is my memo field, and in which nReturn is a numeric value returning either the MIN, MAX or AVG of the string of values (separated by commas) I've passed to the procedure. The procedure is working fine except when I have more than 255 characters (sometimes it's 300+ characters).
>
>Is there a way that I can get around the 255 string-length limit?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform