You do have Value type, but neither work 100%. Both fail Time for example.
And I believe v16r6 fails Date too (fixed in v17.0Beta).

I reported that same issue to the beta forum. I hope that gets sorted out
in the beta cycle.

On Thu, Apr 26, 2018 at 12:36 PM Kirk Brooks via 4D_Tech <
[email protected]> wrote:

> If I'm iterating through a collection how can I get the type of an element?
> Here are some results from current attempts:
> $col:=New collection(New object;123;"XYZ";New collection)
> $type:=Type($col)  //  type = 42
> $type:=Type($col[0])  // err: 4D was expecting a field or variable or
> parameter
> $type:=Type($col[1])  // err: 4D was expecting a field or variable or
> parameter
> C_OBJECT($obj)
> $obj:=$col[0]
> $type:=Type($obj)  //  38
> $obj:=$col[1]
> $type:=Type($obj)  //  err: argument types are incompatible
>
> ​Thanks​
>
> --
> Kirk Brooks
> San Francisco, CA
> =======================
>
> *We go vote - they go home*
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to