ignoring line prefix

John W. Eaton jwe at octave.org
Wed Jul 8 13:07:43 CDT 2009


On 25-Jun-2009, Przemek Klosowski wrote:

|    This happens because you created a variable called PS1 which hides
|    the built-in function PS1.  Maybe the warning should also say
|    something like
| 
|      By assigning a value to PS1, you will create a variable which will
|      hide the built-in function PS1.
| 
| Yes, the problem is that it's a confusing behavior: someone tries to
| do it the old/wrong way, and as a result can't use the new/correct
| way. Perhaps the message should be clarified to say 
| 
| warning: PS1 is no longer a built-in variable; use "clear PS1" to restore correct usage, PS1("..")
| 
| or a clearer, more verbose version:
| 
| warning: PS1 is no longer a built-in variable; please read the NEWS
| 	 file or type `news' for details.  The new recommended usage
| 	 is to use a function PS1(). However, by assigning to PS1, you
| 	 have created a variable that hides the function PS1(). To
| 	 restore it, type "clear PS1".
| 
| Which one do you prefer? 
| 
| I think this would work for all built-in functions/variables. 

I checked in the following change.

  http://hg.savannah.gnu.org/hgweb/octave/rev/86eb5ff921d0

Thanks,

jwe


More information about the Octave-maintainers mailing list