summaryrefslogtreecommitdiffstats
path: root/runtime/doc/builtin.txt
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2023-09-28 22:46:37 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-28 22:46:37 +0200
commit413f83990f15d5d59d27ab741670f527a7a3feb8 (patch)
treea2ed23ee4e864430e0ebf59a0f33e864ecb843ef /runtime/doc/builtin.txt
parentf057aca1cc2480e820b3ca5d8d407e3976369777 (diff)
patch 9.0.1950: Vim9: error codes spread outv9.0.1950
Problem: Vim9: error codes spread out Solution: group them together and reserve 100 more for future use Reserve 100 error codes for future enhancements to the Vim9 class support closes: #13207 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r--runtime/doc/builtin.txt26
1 files changed, 13 insertions, 13 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 74e024d97d..8a92ff6ecf 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -6830,55 +6830,55 @@ printf({fmt}, {expr1} ...) *printf()*
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
< 1.41
- *E1400*
+ *E1500*
You cannot mix positional and non-positional arguments: >
echo printf("%s%1$s", "One", "Two")
-< E1400: Cannot mix positional and non-positional
+< E1500: Cannot mix positional and non-positional
arguments: %s%1$s
- *E1401*
+ *E1501*
You cannot skip a positional argument in a format string: >
echo printf("%3$s%1$s", "One", "Two", "Three")
-< E1401: format argument 2 unused in $-style
+< E1501: format argument 2 unused in $-style
format: %3$s%1$s
- *E1402*
+ *E1502*
You can re-use a [field-width] (or [precision]) argument: >
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
< 1 at width 2 is: 01
However, you can't use it as a different type: >
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
-< E1402: Positional argument 2 used as field
+< E1502: Positional argument 2 used as field
width reused as different type: long int/int
- *E1403*
+ *E1503*
When a positional argument is used, but not the correct number
or arguments is given, an error is raised: >
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
-< E1403: Positional argument 3 out of bounds:
+< E1503: Positional argument 3 out of bounds:
%1$d at width %2$d is: %01$*2$.*3$d
Only the first error is reported: >
echo printf("%01$*2$.*3$d %4$d", 1, 2)
-< E1403: Positional argument 3 out of bounds:
+< E1503: Positional argument 3 out of bounds:
%01$*2$.*3$d %4$d
- *E1404*
+ *E1504*
A positional argument can be used more than once: >
echo printf("%1$s %2$s %1$s", "One", "Two")
< One Two One
However, you can't use a different type the second time: >
echo printf("%1$s %2$s %1$d", "One", "Two")
-< E1404: Positional argument 1 type used
+< E1504: Positional argument 1 type used
inconsistently: int/string
- *E1405*
+ *E1505*
Various other errors that lead to a format string being
wrongly formatted lead to: >
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
-< E1405: Invalid format specifier:
+< E1505: Invalid format specifier:
%1$d at width %2$d is: %01$*2$.3$d
prompt_getprompt({buf}) *prompt_getprompt()*