Does clarion have a variant type? 
Author Message
 Does clarion have a variant type?

Does clarion have a variant type?  
Thanks


Mon, 22 Mar 2004 22:31:04 GMT  
 Does clarion have a variant type?
Try ANY.  See the Help on how to use ANY.

--
Russ
"My spell checker makes it read more better"


Does clarion have a variant type?
Thanks



Mon, 22 Mar 2004 22:25:26 GMT  
 Does clarion have a variant type?
Hi Allen!

Quote:
> Does clarion have a variant type?

Well, it seems to in C5.5 and maybe in C5b as well, at least in
a limited fashion. What I know is undocumented but the result of
an accident followed by observation with the de{*filter*}.

You can code:

MyVar  VARIANT

and it WILL compile!

If you check out the contents of MyVar with the de{*filter*}, it
seems to conform to the standard VARIANT structure used in COM
and ADO (and VB). Clarion only supports the equivalents of LONG,
REAL, and CSTRING; i.e. no matter what I assign to MyVar in a
Clarion program, it will undergo automatic Clarion conversion to
one of the those three types. I have not tried using VB or
something like that to create other VARIANT types to see what
Clarion would do with them as inputs.

-- Craig (The Data Ferret)
http://www.*-*-*.com/ , NetClip
http://www.*-*-*.com/
http://www.*-*-*.com/ !
Virtual Access 5.51 build 315 Win98
http://www.*-*-*.com/ ID #184149
"Do not meddle in the affairs of FERRETS..."



Mon, 22 Mar 2004 18:50:33 GMT  
 Does clarion have a variant type?
Well I'll be!  Learn something new! <g>

--
Russ
"My spell checker makes it read more better"



Hi Allen!

Quote:
> Does clarion have a variant type?

Well, it seems to in C5.5 and maybe in C5b as well, at least in
a limited fashion. What I know is undocumented but the result of
an accident followed by observation with the de{*filter*}.

You can code:

MyVar  VARIANT

and it WILL compile!

If you check out the contents of MyVar with the de{*filter*}, it
seems to conform to the standard VARIANT structure used in COM
and ADO (and VB). Clarion only supports the equivalents of LONG,
REAL, and CSTRING; i.e. no matter what I assign to MyVar in a
Clarion program, it will undergo automatic Clarion conversion to
one of the those three types. I have not tried using VB or
something like that to create other VARIANT types to see what
Clarion would do with them as inputs.

-- Craig (The Data Ferret)
http://www.*-*-*.com/ , NetClip
http://www.*-*-*.com/
http://www.*-*-*.com/ !
Virtual Access 5.51 build 315 Win98
http://www.*-*-*.com/ ID #184149
"Do not meddle in the affairs of FERRETS..."



Mon, 22 Mar 2004 22:59:42 GMT  
 Does clarion have a variant type?
But undocumented means unsupported and it may go away.

--

Steve Parker

====================================
  kb and download center at: www.par2.com
====================================



Quote:
> Well I'll be!  Learn something new! <g>

> --
> Russ
> "My spell checker makes it read more better"



> Hi Allen!

> > Does clarion have a variant type?

> Well, it seems to in C5.5 and maybe in C5b as well, at least in
> a limited fashion. What I know is undocumented but the result of
> an accident followed by observation with the de{*filter*}.

> You can code:

> MyVar  VARIANT

> and it WILL compile!

> If you check out the contents of MyVar with the de{*filter*}, it
> seems to conform to the standard VARIANT structure used in COM
> and ADO (and VB). Clarion only supports the equivalents of LONG,
> REAL, and CSTRING; i.e. no matter what I assign to MyVar in a
> Clarion program, it will undergo automatic Clarion conversion to
> one of the those three types. I have not tried using VB or
> something like that to create other VARIANT types to see what
> Clarion would do with them as inputs.

> -- Craig (The Data Ferret)
> http://www.*-*-*.com/ , NetClip
> http://www.*-*-*.com/
> http://www.*-*-*.com/ !
> Virtual Access 5.51 build 315 Win98
> http://www.*-*-*.com/ ID #184149
> "Do not meddle in the affairs of FERRETS..."



Mon, 22 Mar 2004 22:58:34 GMT  
 Does clarion have a variant type?
Good point.  Kinda like the BSTRING type.  It was "activated" by mistake,
but certainly undocumented.  In this case, however, I don't think it will be
pulled in the future.

--
Russ
"My spell checker makes it read more better"


But undocumented means unsupported and it may go away.

--

Steve Parker

====================================
  kb and download center at: www.par2.com
====================================



Quote:
> Well I'll be!  Learn something new! <g>

> --
> Russ
> "My spell checker makes it read more better"



> Hi Allen!

> > Does clarion have a variant type?

> Well, it seems to in C5.5 and maybe in C5b as well, at least in
> a limited fashion. What I know is undocumented but the result of
> an accident followed by observation with the de{*filter*}.

> You can code:

> MyVar  VARIANT

> and it WILL compile!

> If you check out the contents of MyVar with the de{*filter*}, it
> seems to conform to the standard VARIANT structure used in COM
> and ADO (and VB). Clarion only supports the equivalents of LONG,
> REAL, and CSTRING; i.e. no matter what I assign to MyVar in a
> Clarion program, it will undergo automatic Clarion conversion to
> one of the those three types. I have not tried using VB or
> something like that to create other VARIANT types to see what
> Clarion would do with them as inputs.

> -- Craig (The Data Ferret)
> http://www.*-*-*.com/ , NetClip
> http://www.*-*-*.com/
> http://www.*-*-*.com/ !
> Virtual Access 5.51 build 315 Win98
> http://www.*-*-*.com/ ID #184149
> "Do not meddle in the affairs of FERRETS..."



Mon, 22 Mar 2004 23:06:41 GMT  
 Does clarion have a variant type?
Whats the difference between an any and a variant then?

--
Kind regards,
James Cooke
=================================


Quote:
> Well I'll be!  Learn something new! <g>

> --
> Russ
> "My spell checker makes it read more better"



> Hi Allen!

> > Does clarion have a variant type?

> Well, it seems to in C5.5 and maybe in C5b as well, at least in
> a limited fashion. What I know is undocumented but the result of
> an accident followed by observation with the de{*filter*}.

> You can code:

> MyVar  VARIANT

> and it WILL compile!

> If you check out the contents of MyVar with the de{*filter*}, it
> seems to conform to the standard VARIANT structure used in COM
> and ADO (and VB). Clarion only supports the equivalents of LONG,
> REAL, and CSTRING; i.e. no matter what I assign to MyVar in a
> Clarion program, it will undergo automatic Clarion conversion to
> one of the those three types. I have not tried using VB or
> something like that to create other VARIANT types to see what
> Clarion would do with them as inputs.

> -- Craig (The Data Ferret)
> http://www.*-*-*.com/ , NetClip
> http://www.*-*-*.com/
> http://www.*-*-*.com/ !
> Virtual Access 5.51 build 315 Win98
> http://www.*-*-*.com/ ID #184149
> "Do not meddle in the affairs of FERRETS..."



Mon, 22 Mar 2004 23:29:19 GMT  
 Does clarion have a variant type?
FAQ'd

Steve Parker

====================================
  kb and download center at: www.par2.com
====================================


Quote:
> Hi Allen,



Mon, 22 Mar 2004 23:43:25 GMT  
 Does clarion have a variant type?
Just found documentation on VARIANTS.  From the 5.5 Help:

"Value parameters are passed to OLE/OCX objects as strings (except Boolean
parameters). Since OLE/OCX objects are supposed to cast their input to the
correct data types using a VARIANT mechanism (similar to Clarion's data type
conversion), this allows the most compatibility with the least work. "

Andy's post would appear the most useful as ANY variables are only simple
data types, thus it is restricted in its use to that.  His suggestion to use
GROUP structures would encompass more uses.  And when viewed in the context
of using ADO, GROUPs are the only logical choice.  Also, Andy's response
fits with the Help text.

--
Russ
"My spell checker makes it read more better"


Whats the difference between an any and a variant then?

--
Kind regards,
James Cooke
=================================



Mon, 22 Mar 2004 23:48:26 GMT  
 Does clarion have a variant type?
Thanks Russ

--
Kind regards,
James Cooke
=================================


Quote:
> Just found documentation on VARIANTS.  From the 5.5 Help:

> "Value parameters are passed to OLE/OCX objects as strings (except Boolean
> parameters). Since OLE/OCX objects are supposed to cast their input to the
> correct data types using a VARIANT mechanism (similar to Clarion's data
type
> conversion), this allows the most compatibility with the least work. "

> Andy's post would appear the most useful as ANY variables are only simple
> data types, thus it is restricted in its use to that.  His suggestion to
use
> GROUP structures would encompass more uses.  And when viewed in the
context
> of using ADO, GROUPs are the only logical choice.  Also, Andy's response
> fits with the Help text.

> --
> Russ
> "My spell checker makes it read more better"



> Whats the difference between an any and a variant then?

> --
> Kind regards,
> James Cooke
> =================================



Tue, 23 Mar 2004 01:07:56 GMT  
 Does clarion have a variant type?
Hi andrew, were can we get a copy of your ado classes, to start adding our
own stuff.

are you ready to sell this class wrapper

im sure were all prepared to buy a copy it !

the problems with products like calling the explorer ocx are well documented
, (simon burrows) ect.

cheers steve ryan


Quote:
> Hi Allen,

> > Does clarion have a variant type?

> Just treat is as a group and pass by address. Where you need to pass by

value, I have some Asm code that puts a whole in the
Quote:
> stack and pushes the data on so those methods can be called. Attached is

code, below example etc..
Quote:

> The following example calls the ADO Recordset Seek method. This is because

you can't simply push it in a thread safe way any
Quote:
> other way and you need to use the group rather than the built in type so

you have the control you need without the datatype
Quote:
> conversion code in the RTL getting in the way. The tVariant structure can

be found in the ai_comdef.inc file. A brief
Quote:
> explanation of the structures follows the example....

> CRecordSet21.Seek procedure(*tVariant vtKeyValues, long SeekOption)

> Offs            long
> hr              HRESULT
> pFunc           long
> pRst            long

>   code
>     pFunc = address(self.IRst21.raw_Seek)
>     pRst = address(self.IRst21)
>     Offs = PushLong(Offs, SeekOption)
>     Offs = PushVariant(Offs, address(vtKeyValues))
>     Offs = PushLong(Offs, pRst)
>     hr = AdjustStackCallAndClean(Offs, pFunc)
>     return hr

> The srVal over iVal is needed for 4 byte real values coming back from

something like ADO else the value gets messed up. See the
Quote:
> next explanation. iVal recieves all values of a 4 byte size such as

VT_BSTR, VT_I4  etc. BSTR values are pointers and need
Quote:
> converting to clarion cstrings using API functions.

> tVariant                group,type
> vt                        short
> wReserved1                short
> wReserved2                short
> wReserved3                short
> iVal                      long
> iVal2                     long
> srVal                     sreal,over(iVal)
>                         end

> This is a variation of the tVariant specifically for a real as this is

needed when reading real values into a variant from

- Show quoted text -

Quote:
> something like ADO or clarion will use it's type conversion and mess up
the value.

> tVariantr               group,type
> vt                        short
> wReserved1                short
> wReserved2                short
> wReserved3                short
> rVal                      real
>                         end

> The following is needed for omitable params, nothing else will do less you
receive an error.

> vtMissing               group
> vt                        short(VT_ERROR)
> wReserved1                short
> wReserved2                short
> wReserved3                short
> iVal                      long(DISP_E_PARAMNOTFOUND)
> pad                       long
>                         end

> Here's how to compile in the ASM code...

> SupFnc      class,link('supfnc.a', _COMLinkMode_),dll(_COMDllMode_)
>                   end

>     module('supfnc.a')
>       AdjustStackCallAndClean(long dwSize, long

pFunc),long,name('_AdjustStackCallAndClean')
Quote:
>       PushLong(long Offs, long iVal),long,name('_PushLong')
>       PushVariant(long Offs, long pvt),long,name('_PushVariant')
>     end

> Only functions that pass them by value need this, all others I have

encountered in COM do not need anything special doing. But
Quote:
> if it is needed, all params must be pushed this way. Thankfully they are

all either longs or variants. It's a quick dirty hack
Quote:
> but works nonetheless.

> Let me know if you need any more help. On this NG rather than email would

be better so other people can learn also.

- Show quoted text -

Quote:

> HTH

> Regards

> Andy Ireland
> [Plugware Solutions.com Ltd]
> [Tel : +44 1249 813335]
> [Fax : +44 1249 813462]



Tue, 23 Mar 2004 03:55:03 GMT  
 Does clarion have a variant type?
Hi Steve,

Quote:
> Hi andrew, were can we get a copy of your ado classes, to start adding our
> own stuff.
> are you ready to sell this class wrapper
> im sure were all prepared to buy a copy it !
> the problems with products like calling the explorer ocx are well documented
> , (simon burrows) ect.

The future of the ADO is in SV's hands. I gave them a share of the rights to it. I promised not to sell it but give it to the
community and did so by giving the stuff to SV. I will not do anything that would put me into conflict with SV and that includes
selling them. Besides they were given to SV on the premise they did not sell them but that they could make the templates a paid
upgrade. Therefore you need to contact SV directly.

As for OCX support and the webbrowser control, I am rolling my OLE code into simons app tommorrow and we'll see how it holds up.
So far the only problem is a cleanup issue on unload but I haven't touched the code all week as I've been busy on other things.
This will be a product however, considered by SV to be complimentary not competitive.

Regards

Andy Ireland
[Plugware Solutions.com Ltd]
[Tel : +44 1249 813335]
[Fax : +44 1249 813462]



Tue, 23 Mar 2004 04:10:40 GMT  
 Does clarion have a variant type?
Ditto...
http://www.clarionfoundry.com/General/General_DTypes/variant.htm

--
Kind regards,
James Cooke

www.ClarionFoundry.com

--

Quote:
> FAQ'd

> Steve Parker

> ====================================
>   kb and download center at: www.par2.com
> ====================================



> > Hi Allen,



Tue, 23 Mar 2004 09:43:18 GMT  
 Does clarion have a variant type?
Bidding war? <G>

--

Steve Parker

====================================
  kb and download center at: www.par2.com
====================================


Quote:
> Ditto...
> http://www.clarionfoundry.com/General/General_DTypes/variant.htm

> --
> Kind regards,
> James Cooke

> www.ClarionFoundry.com

> --


> > FAQ'd

> > Steve Parker

> > ====================================
> >   kb and download center at: www.par2.com
> > ====================================



> > > Hi Allen,



Tue, 23 Mar 2004 09:48:33 GMT  
 Does clarion have a variant type?
if your doing COM and need exactly a variant then you can access any of the
win32 apis for variants like variantinit() etc.  If your not doing com and
just dont know the type at compile time, use the Any data type.
Jim Kane


Quote:
> Does clarion have a variant type?
> Thanks



Tue, 23 Mar 2004 12:27:58 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. new object orient variant (has this been done?)

2. Clarion MDI dlls called from VB - well done clarion

3. Re Having trouble doing int 21/2521h

4. Variant type through QNA in DyalogAPL

5. Array as Variant Data Type

6. Error when accessing low level objects and converting variant to refnum Type

7. OLE VARIANT types in Ruby

8. Mapping c++ type VARIANT to Ada

9. Ada Variant Records/Access Types.....

10. When is a variant record type constrained?

11. Type Conversion to COM Variant

12. Q: win32com.client.dynamic: VARIANT type not supported for SAFEARRAYS

 

 
Powered by phpBB® Forum Software