variable as function name

Vance Shipley vances@REDACTED
Wed Apr 20 22:14:02 CEST 2005


Why is is that I can do this:

   1> T = time.
   time
   2> erlang:T().
   {16,8,22}

But not this?

   3> T().

   =ERROR REPORT==== 20-Apr-2005::16:08:12 ===
   Error in process <0.45.0> with exit value: {{badfun,time},[{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]}

   ** exited: {{badfun,time},
               [{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} **





More information about the erlang-questions mailing list