Re: "Resolve Pointer" doesn't work with $locals. Why?

2017-11-13 Thread Keisuke Miyako via 4D_Tech
there is also a difference between running compiled mode (which can be done 
with a 4DB)
and generating a compiled application (4DC).

if you are running 4DB in compiled mode,
the source is still available,
so something like

ON ERR CALL("method2")
C_LONGINT($v)
C_POINTER($p)
$p:=->$v
$p->:="abv"

//method2
ALERT(Error formula)

will show you the offending source code, even in compiled mode.

but if you take a step further and export a 4DC file,
you won't even see the local variable names,
because local variables names are stripped from code.
(it's part of what is involved in code compilation; assembly code is generated 
based on your source code)

> 2017/11/14 11:27、Lee Hinde via 4D_Tech <4d_tech@lists.4d.com> のメール:
> In v15, is there a way to get the name of a passed pointer if it references
> a local variable?




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

Re: "Resolve Pointer" doesn't work with $locals. Why?

2017-11-13 Thread Lee Hinde via 4D_Tech
btw, Resolve Pointer works fine with locals interpreted. This bit me with a
"works fine interpreted, breaks compiled" which hardly ever happens anymore.



On Mon, Nov 13, 2017 at 6:27 PM, Lee Hinde  wrote:

> Trying to understand this bit from the Resolve Pointer docs:
>
>-
>The RESOLVE POINTER command does not work with pointers to local
>variables. In fact, by definition several local variables with the same
>name could exist in different locations, so it is not possible for the
>command to find the correct variable.
>
> http://doc.4d.com/4Dv15/4D/15.5/RESOLVE-POINTER.301-3576828.en.html
>
> I hadn't noticed that and just got bit by it. But it doesn't make sense to
> me. Maybe when they say they can't find the correct variable they mean they
> can't find any local variable.
>
> All Resolve Pointer does for a variable is return the name, so I don't
> really care which instance of the local they find, I'm only after the name.
>
> In v15, is there a way to get the name of a passed pointer if it
> references a local variable?
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**