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 ...
... 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 ...
//----------------------------------------------------------------------------// // 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...
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" ...
... 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 ...
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...
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:...