[fpc-pascal] Name of a var
    michael.vancanneyt at wisa.be 
    michael.vancanneyt at wisa.be
       
    Tue Nov 22 12:02:31 CET 2011
    
    
  
On Tue, 22 Nov 2011, Graeme Geldenhuys wrote:
> 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)
No, if I was to program it using varname, I would get the name of the parameter
in the function SendInteger.
You need the address of the variable that was passed to SendInteger.
Obviously, there is no way the compiler can know that.
Michael.
    
    
More information about the fpc-pascal
mailing list