Mental Guy wrote:
>  print_debug {"2**3"}
>  print_debug {"8**(1.0/3)"}
>  print_debug {"a + 2.038"}
> 
> ...where print_debug is implemented like this:
> 
>  def print_debug(&expr_block)
>    expr = expr_block.call
>    value = eval(expr, expr_block.binding)
>    puts "#{expr} = #{value.inspect}"
>  end
> 
> Does that help?


Thanks for all the help.

This guy Jerry Stuckle is just outright rude on the PHP newsgroup:

Jerry Stuckle wrote:

This is neither C nor Ruby.  Don't try to compare them (and, BTW, it's
not part of the C language - it's the debug libraries you're using which
allow it).

If you want the variable's name, just say it!

   echo '$foo=' . $foo;

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex / attglobal.net
==================


No, if you can't code a simple echo statement than you should be in the
food or hospitality industry.

We told you the answer.  If you don't want to accept it, then the food
or hospitality industry sounds like a much better fit for you.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex / attglobal.net
==================

-- 
Posted via http://www.ruby-forum.com/.