help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to read an integer from the minibuffer


From: Jean Louis
Subject: Re: How to read an integer from the minibuffer
Date: Fri, 12 Nov 2021 22:55:32 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2021-11-12 22:26]:
> Jean Louis wrote:
> 
> >> We see a problem BTW that `string-to-number' returns 0
> >> on error!
> >
> > That problem I have solved in rcd-utilities.el with:
> >
> > (defun string-is-number-p (s)
> >   "Return number only if string is pure number,
> > otherwise NIL."
> 
>   A number is said to be pure if
> 
>     1. It has even number of digits.
>     2. All the digits are either 4 or 5.
>     3. And the number is a palindrome.

Should I say "actual number"?


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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