[fpc-pascal] Name of a var

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Nov 22 11:21:33 CET 2011


On 2011-11-22 11:13, michael.vancanneyt at wisa.be wrote:
> 
> Typing
> 
> VarName:=nameofvar( counter );
> 
> is more work than
> 
> VarName:='counter';
> 
> So what's the point ?

Maybe there is a use for it in the dbugintf unit?

eg:

  SendInteger(counter)

result on the debug server would then possibly be something like...

   2011-11-22 Debug: counter = 20

The SendInteger() function will do the identifier-to-string call, not
the developer. But then, the parameter name might be used, and not the
original identifier name - not sure.


Anyway, currently you have to do the following in dbugintf...

   SendInteger('counter', counter);


I find this annoying, but with CodeTools+SyncroEdit I have managed to
reduce my type too. :-)


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the fpc-pascal mailing list