Search found 66 matches: caller

Return to advanced search

Re: How to create a PRIVATE variable owned by the caller?

I was sure you would write this. :-) I need it for back compatibility.
by Enrico Maria Giordano
Thu Jan 12, 2023 8:07 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

Enrico, Why are you using a PRIVATE? I haven't used PRIVATEs for years. You can do the same thing you wanted this way: FUNCTION MAIN()    LOCALE cName:=""    cName:= CREATEVAR( cName, "Hello" )    ? cName // it exists here    RETURN NILSTATIC FUNCTION CREATEVAR...
by James Bott
Wed Jan 11, 2023 11:47 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

Thank you but, please, read the whole thread. We have already discussed that code.
by Enrico Maria Giordano
Wed Jan 11, 2023 6:14 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

this is the function code in "memvars.c" of Harbour HB_FUNC( __MVSETBASE ) { HB_STACK_TLS_PRELOAD HB_ISIZ nOffset = hb_stackBaseProcOffset( 0 ); if( nOffset > 0 ) hb_stackItem( nOffset )->item.asSymbol.stackstate->nPrivateBase = hb_memvarGetPrivatesBase(); }
by vensanto
Wed Jan 11, 2023 6:08 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

Thank you, but I need it for xHarbour (please read the whole thread).
by Enrico Maria Giordano
Wed Jan 11, 2023 5:53 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

... offset so PRIVATE variables created in function which calls __mvSetBase() will not be released when the function exit but will be inherited by its caller. Function sa_1() sa_2() ? cTXT Return .T. Function sa_2() Private cTXT:="CIAO" __mvSetBase() // importante Return .T.
by vensanto
Wed Jan 11, 2023 5:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

Yes, that's the module I'm experimenting with.
by Enrico Maria Giordano
Wed Jan 11, 2023 3:19 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

C:\HBBCC74\src\vm

03/04/2020 19:58 52.717 memvars.c

Regards, saludos.
by karinha
Wed Jan 11, 2023 2:59 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

I am afraid no as xHarbour does not have the member stackstate in the struct hb_struSymbol :-(

Maybe there is another way to do it, but I don't know it
by Antonio Linares
Wed Jan 11, 2023 12:04 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

Great! Is there a similar function (__MVSETBASE()) available for xHarbour?
by Enrico Maria Giordano
Wed Jan 11, 2023 11:49 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

Dear Enrico, #include "Fivewin.ch"FUNCTION MAIN()    CREATEVAR( "TEST", "Hello" )    ? M -> TEST // it exists here    RETURN NILSTATIC FUNCTION CREATEVAR( cName, xValue )    __MVPRIVATE( cName )    __MVPUT( cName, xValue )    _...
by Antonio Linares
Wed Jan 11, 2023 11:41 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777

Re: How to create a PRIVATE variable owned by the caller?

Code: Select all  Expand view
Error description: (DOS Error 2) BASE/2005  Open error: MYTEST.MEM
by Enrico Maria Giordano
Wed Jan 11, 2023 8:38 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to create a PRIVATE variable owned by the caller?
Replies: 21
Views: 777
Next

Return to advanced search