Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I declare a variant in FoxPro
Message
From
26/08/1999 11:22:39
 
 
To
26/08/1999 11:03:49
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00257922
Message ID:
00257956
Views:
34
>>Hello,
>>
>>I know this probably sounds like a stupid question but here is goes:
>>
>>I am try to make our component work in FoxPro6. Basically I am try to do memory compression.
>>
>>I have a string that I want to compress and then place in a byte array to then later on uncompress it back into a string.
>>
>>This is the code I am try to use...
>>
>>public gcBigBlob && uncompressed data
>>public gcLittleBlob && compressed data (variant)
>>
>>gcBigBlob = "This is the string I wnat to compress"
>>gcLittleBlob = ""
>>
>>&& Set up the compression control:
>>gnZip = CREATEOBJECT('XceedSoftware.XceedCompression')
>>
>>&& Compress the data:
>>rslt = gnZip.Compress(m.gcBigBlob, m.gcLittleBlob, .T.)
>>MESSAGEBOX (gnZip.GetErrorDescription (rslt))
>>
>>? m.gcLittleBlob
>>? LEN(m.gcLittleBlob)
>>
>>
>>The problem is that gcLittleBlob remains empty and the string is never compressed.
>
>If the above is the correct syntax you will have to pass the variable by reference rather than value. Make your call like this...
>
>rslt = gnZip.Compress(m.gcBigBlob, @m.gcLittleBlob, .T.)

Bob, while I've never seen an error, pass by ref should understand to use a memvar, and it might have a problem parsing with the m. notation.

>
>What is returned in rslt? The above will pass the variable by reference which assumes the Compress method will update that variable with the result you want.
>
>BOb
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform