[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of constants.

From: John W. Eaton
Subject: Re: List of constants.
Date: Sat, 10 Feb 2007 10:29:22 -0500

On 10-Feb-2007, David Bateman wrote:

| Also I'm not sure its a great idea to have a function for each constant,
|  as you increase the chances of a collision with one of the users
| functions. I think I'd prefer a function that took a string argument,
| converted to lower case and found the minimum unique matching string and
| returned the matching constant. That is
| c = physical_constant("SpeedOf")
| would match "speedoflight", but if both "speedoflight" and
| "speedofunladenpigeon" were defined
| c = physical_constant("SpeedOf")
| should throw an error as an ambiguous request for a constant. In any
| case this is just a preference of how I would implement this if I was
| doing it..

Yes, I agree that in this case, one-stop shopping would be much
better.  Also, you could have 

  s = physical_constant ();

return a structure with all of the constants, or at least return or
print a list of those available.  Or perhaps return a structure array
with elements



reply via email to

[Prev in Thread] Current Thread [Next in Thread]