Search found 138 matches: locals

Return to advanced search

Re: XBrowse: how to load image data instead of image name

Hello Marc, detached locals Here is an explanation from MR. RAO . Thank you, Mr. Rao, for always helping us. Best regards, Otto ____________________________________________________________________________ Creating controls in a loop ...
by Otto
Tue Nov 03, 2020 9:28 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: XBrowse: how to load image data instead of image name
Replies: 17
Views: 1528

public variables yes or not

... are declared The privates are visible from the moment they are declared onwards to their execution The publics are visible throughout the program Locals only within your function where they are declared I see that we can use all types of variables in modharbour? of course But static seems a bit ...
by Otto
Wed Sep 23, 2020 7:27 am
 
Forum: mod_harbour
Topic: public variables yes or not
Replies: 0
Views: 271

Re: Ayuda con @ PUSHBUTTON

Prueba usando detached locals.

[url]
viewtopic.php?f=3&t=38345&p=228917&hilit=detached#p228917
[/url]
by albeiroval
Wed Feb 05, 2020 1:06 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Ayuda con @ PUSHBUTTON
Replies: 3
Views: 603

Detached locals y clases dinamicas

//----------------------------------------------------------------------------// // Se define el MESSAGE de una columna para tomar y dar valores. static function GenDataField( oADODb, nPos ) Local cNameMethod := oADODb:aFldNames[ nPos ] //#ifdef __HARBOUR__ local nClassH := oADODb:ClassH __clsAddMs...
by hmpaquito
Tue Jan 21, 2020 3:15 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Detached locals y clases dinamicas
Replies: 0
Views: 435

Re: DTPICKER in array of gets

No. You can not use the loop variable. You need to create the DTPICKER in a separate function in the good old way using the concept of detached locals. for n := 1 to Len( aValues )   nRow += 32   if ValType( aValues[ n ] ) == "D"    ...
by nageswaragunupudi
Tue Jan 14, 2020 8:34 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: DTPICKER in array of gets
Replies: 2
Views: 480

Re: xBrowse edit dialog and navigation

... oCustomers: SetOrder ("TAG01") oCustomers: gotop () but i don't know how i did it with Function OpenData (cDbf, aIdx) LOCAL oDbf Locals oDbf: = TDatabase (): Open (nil, cDbf, "DBFCDX", .T.) IF VALTYPE (aIdx) == "A" FOR i: = 1 TO LEN (aIdx) DBSETINDEX (aIdx ...
by Silvio.Falconi
Sat Jun 01, 2019 7:05 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse edit dialog and navigation
Replies: 26
Views: 4012

Re: Declareing locals

Hello, I did this yesterday and the results are the same. Declaration with initialization seams faster. Enrico is right that in a real world program you would not see any differences. In the same source I read that there is also speed differences between passing values by reference or value. Best re...
by Otto
Thu May 02, 2019 12:33 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

Mr. Otto,

Try first call to Local2() and after call to Local1()

Regards
by hmpaquito
Thu May 02, 2019 7:37 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

Hello and thank you for your help. I tested with these changes and see a difference in speed. RETURN NILLocal nMax:= 10000000 STATIC FUNCTION Local1()Local a:= {}Local b:= {}Local c:= {}Local d:= {}Local e:= {}Local c1:= ""Local c2:...
by Otto
Wed May 01, 2019 9:17 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

This is NOT a real program, it is a sample. Anyway, it shows two identical values here.

EMG
by Enrico Maria Giordano
Wed May 01, 2019 7:24 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

Mr. Otto, Testing: FUNCTION Main()Local nILocal nMax:= 1000000Local nSec1, nSec2Local cSec1, cSec2nSec1:= Seconds()FOR nI:= 1 TO nMax   Local1()NEXTcSec1:= Str(Seconds()- nSec1, 10, 5)nSec2:= Seconds()FOR nI:= 1 TO nMax   Local2()NEXTcSec2:= St...
by hmpaquito
Wed May 01, 2019 7:20 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

Teoretically, yes. But I doubt it would make any visible difference in real programs.

EMG
by Enrico Maria Giordano
Wed May 01, 2019 7:11 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

Hello Enrico,
I read that declaration with initialization should be 3%-40% more speedy in executing the program.

Could this be?
Thank you in advance

Otto
by Otto
Wed May 01, 2019 6:54 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

local aTemp := {}

is equivalent to

local aTemp
aTemp = {}

The advantage is that the first form is more compact, I presume.

EMG
by Enrico Maria Giordano
Wed May 01, 2019 6:00 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904

Re: Declareing locals

Hello Enrico,
Thank you.
But what are the advantages and disadvantages of these two.
With kind regards
Otto
by Otto
Wed May 01, 2019 5:35 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Declareing locals
Replies: 10
Views: 904
PreviousNext

Return to advanced search