I'm currently reading Learn Vimscript the Hard Way. I did the following experiments as an exercise in the book.
:let &wrap="1.5"
:let &wrap="0.5"
:let &wrap=str2nr("0.5",8)
The first one ran normally, but the second one complains E521: Number required: &wrap = '0.5'
. I thought it was the leading zero that cause the error, perhaps it makes Vim regard it as a octal number. So I tested the third hoping it would produce the same error, but it executed normally. What's the reason of these scenarios?