On Wed, 11 Mar 2009, Ron Pinkas wrote:

Hi,

> Ask Przemek to test:

I read it.

> //---------------------------------------------------//
> MEMVAR GetList, MyGetList
> 
> PROCEDURE Main()
>    SAVE TO Test ALL LIKE None
>    RESTORE FROM Test

CLEAR MEMORY  // is simpler

>    ? GetList
>    ? MyGetList
> RETURN
> INIT PROCEDURE SetMyGetList
>    PUBLIC MyGetList := "MyGetList"
> RETURN
> //---------------------------------------------------//
> This is only one of the tests I ran, and as I reported I encountered few 
> inconsistent results, or results I could not make sense of. AFAICT from my 
> tests Clipper does have some sort of protection specifically for GetList.

For the above code Harbour gives exactly the same results as CL52 and CL53:
   Error BASE/1003  Variable does not exist: MYGETLIST
GetList still exists and MyGetList is removed.
So far the only one variable I know which is not released by
RESTORE FROM <file> or CLEAR MEMORY in Clipper is PUBLIC GetList.
All others also PRIVATE values which hides PUBLIC GetList are removed.
In such way works also current Harbour and this code illustrates it.

      memvar getlist
      proc main()
         getlist:="public:getlist"
         ? getlist
         private getlist:="private:getlist"
         ? getlist
         CLEAR MEMORY
         ? getlist
      return

In xHarbour only RESTORE FROM <file> tries to keep GetList value
(such logic is not enabled for CLEAR MEMORY) and it safes only
the recently declared PRIVATE GetList value converting it in hidden
way to PUBLIC instead of the initial PUBLIC one.
Both things should be fixed probably also with some other things
related to memvars.

best regards,
Przemek

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to