Horvath Adam wrote:
Hi,
I can not find (manual, list-archiv, google) how to use boolean
operators (and, or) in script.
I prefer this:
if i>500 and i<1000
if (i > 500) && (i < 1000)
The parentheses are not really necessary but I use them for clarity.
see ":help expression-syntax"
One working solution:
normal G
let numberofrows = line(".")
normal gg
let i = 1
while i<=numberofrows
if i>500
if i<1000
" do something
endif
endif
if (i > 500) && (i < 1000)
" do something
endif
let i += 1
endwhile
Any other way?
Thanks,
Aruna
or in the exact case above,
let nrows = line(".")
let i = 501
while i <= min([999, nrows])
" do something
let i += 1
endwhile
let i = 1000
Best regards,
Tony.
--
"Hit any key to continue" is very confusing when you have two keyboards.