Stewart, James wrote: > What do you all consider the best way to pass components (TDataSet, > TTabControl, etc) as parameters to a function or procedure call? > > VAR, CONST, or by Value? Which would give better execution speed or > memory managent? Is one way of passing the parameters better than > another?
I almost always us const because I usually never want the caller to replace the object with another. Const allows the caller to use the object, modify its properties, etc. without doing any strange stuff that would cause real harm to the application. _______________________________________________ Delphi mailing list -> [email protected] http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

