Question: Problem returning a value from an exported object of a module

When a procedure is called that is nested inside of a module, it returns its own name rather than the value it calculates.  E.g. here is a very simple package:

somePackage := module ()

  export someproc; 

  someproc := proc (yr)

    return (2010);

  end proc

end module;


That compiles fine.  But when this is executed:


The actual value returned is the string "someproc", not 2010.  How can I make sure that the return statement is properly executed?

Please Wait...