« Return to Thread: v11.4 : 67 is a list reference

RE: v11.4 : 67 is a list reference

by Pluto Ng :: Rate this Message:

Reply to Author | View in Thread

David,

What I was trying to do was to overload a parameter so that it may be a plain longint value or a hierarchical list reference. I guess this is a no go if 4D is stashing hierarchical lists in memory itself.

And, Is a list() becomes less useful this way. Imagine a bug in the program causing 67 to be passed to a method which tests if it is a list then clears it. It would be very much fun tracking it down since we don't even know what list 67 is for, let alone the consequences of clearing it.

Pluto Ng


> -----Original Message-----
> From: 4d_tech-bounces@...
> [mailto:4d_tech-bounces@...] On Behalf Of David Dancy
> Sent: Friday, July 03, 2009 10:09 AM
> To: 4D iNug Technical
> Subject: Re: v11.4 : 67 is a list reference
>
> That's actually not too unlikely, thinking about it. A lot of 4D is
> built with ... 4D, and that includes a few hierarchical lists. As far
> as the language is concerned, a list reference is just a longint; 67
> is as good as any other. So what you're seeing may just be a reference
> to a h-list that's used somewhere in the application, and built on
> startup before any of your code gets to run...
>
>
>
> 2009/7/3 Pluto Ng <plutong@...>:
> > I encounter an inexplicable problem so I put the following
> code as the
> > first thing in On Startup.
> >
> >
> >
> > C_LONGINT($ref)
> >
> > $ref:=67
> >
> > If (Is a list($ref))
> >
> >   ALERT("67 is a list reference!")
> >
> > End if
> >
>
>
>
> --
> David Dancy
> Sydney, Australia
> **********************************************************************
> Live Data Mapping Services with 4D v11 SQL
> See it for yourself - http://www.4d.com/solutions/ndwater.html
>
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://www.4D.com/support/faqnug.html
> Archive:  http://lists.4D.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4D_Tech-Unsubscribe@...
> **********************************************************************
>
**********************************************************************
Live Data Mapping Services with 4D v11 SQL
See it for yourself - http://www.4d.com/solutions/ndwater.html

4D Internet Users Group (4D iNUG)
FAQ:  http://www.4D.com/support/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

 « Return to Thread: v11.4 : 67 is a list reference