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

## Re: How to read an integer from the minibuffer

 From: Jean Louis Subject: Re: How to read an integer from the minibuffer Date: Sat, 13 Nov 2021 09:37:35 +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-13 00:16]:
> Jean Louis wrote:
>
> > Should I say "actual number"?
>
> It depends:
>
>   complex    C = ... -3 + 2i, 0, 1 + 3i ...
>   composite      4, 6, 8, 9, 10, 12 ...
>   integers   Z = ... -3, -2, -1, 0, 1, 2, 3 ...
>   irrational F = ... \pi, \sqrt{2}, 0.121221222 ...
>   natural    N = 1, 2, 3, 4 ...
>   prime      P = 2, 3, 5, 7, 11, 13, 17 ...
>   rational   Q = -\frac{1}{2}, 0.33333 ... \frac{5}{2}, \frac{11}{10} ...
>   real       R = ... -3, -1, 0, \frac{1}{5}, 1.1, \sqrt{2}, 2, 3, \pi ...
>   whole      W = 0, 1, 2, 3, 4 ...
>
> https://davenport.libguides.com/math-skills-overview/basic-operations/sets

I would just check for those numbers that are accepted by Emacs Lisp.

2i does not evaluate, thus I cannot use that one.

--
Jean

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

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