Am 15.09.2019 um 14:33 schrieb Bram Moolenaar:
Patch 8.1.2035
Problem: Recognizing octal numbers is confusing.
Solution: Introduce scriptversion 4: do not use octal and allow for single
quote inside numbers.
Files: runtime/doc/eval.txt, src/vim.h, src/eval.c, src/scriptfile.c,
src/evalfunc.c, src/testdir/test_eval_stuff.vim,
src/testdir/test_functions.vim
Single quotes could be a pitfall for scripts that attempt to skip string
literals in Vim script code.
// flags for vim_str2nr()
! #define STR2NR_BIN 0x01
! #define STR2NR_OCT 0x02
! #define STR2NR_HEX 0x04
#define STR2NR_ALL (STR2NR_BIN + STR2NR_OCT + STR2NR_HEX)
! #define STR2NR_NO_OCT (STR2NR_BIN + STR2NR_HEX)
!
! #define STR2NR_FORCE 0x80 // only when ONE of the above is used
Is 0x80 the intended value or 0x08 ?
! #define STR2NR_QUOTE 0x10 // ignore embedded single quotes
What happens with
:echo 1''234
:echo 1'''234
? Is it an error?
--
Andy
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/5D7E7BE6.2080801%40yahoo.de.