Przemek,

--------------------------------------------------------------------------------------------------------
2009-02-27 15:03 UTC-0430 Ron Pinkas <ron/at/xharbour.com>
   * source\vm\memvars.c
     ! Fixed __M[V]RESTORE() to be Clipper compatible.
       Clipper protects the value of GetList if it exists, when ADDITIVE not
specified

I still noticed some minor incompatibility which appears to be a Clipper
bug, or at least I haven't been able to decipher the logic. IAE it manifests
in very rare condition which I doubt any user is even aware of the odd
behavior
--------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------
2009-03-01 13:58 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
  * harbour/include/hbapi.h
  * harbour/include/hbstack.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/memvars.c
    ! fixed __M[V]CLEAR()/ __M[V]RESTORE() to be exactly Clipper compatible
      and do not release PUBLIC GetList value.
--------------------------------------------------------------------------------------------------------

I'll be thankful if you can help me understand Clipper results for:

//-------------------------------------------//
MEMVAR GetLis

PROCEDURE Main()
  ? ProcLine(), GetList

  PrivateGet()

  ? ProcLine(), GetList
RETURN

PROCEDURE PrivateGet()
   PRIVATE GetList := "Private"

   SAVE TO Test ALL
   OtherPrivateGet()

   ? ProcLine(), GetList
RETURN // Should we not get back to PUBLIC visibility here?

PROCEDURE OtherPrivateGet()
   RESTORE FROM Test //ADDITIVE
   ? ProcLine(), GetList
RETURN

INIT PROCEDURE MyInit()
   GetList := "Public"
RETURN
//-------------------------------------------//

Ron

--------------------------------------------------
From: "Przemyslaw Czerpak" <[email protected]>
Sent: Thursday, March 12, 2009 4:25 AM
To: "Xharbour-Developers List" <[email protected]>
Subject: Re: [xHarbour-developers] Upper() and codepage.

> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> 

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to