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:01:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/08/1999 10:56:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00257922
Message ID:
00257929
Views:
36
>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.
>
>So I guess I need to know how to tell FoxPro that gcLittleBlob is a varian byte array.
>
>I hope my question is clear! if not please let me know and I will try to explain further..
>
>Thank you for your help :)
>
>Jenny Beland
>Technical Support
>Xceed Software Inc.
Jenny,
The send it by reference. You might need to initialize it to something like space(100).
rslt = gnZip.Compress(m.gcBigBlob, @m.gcLittleBlob, .T.)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform