Jürgen Krämer wrote:
Hi,

Horvath Adam wrote:
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

"boolean and" is written as "&&" and "boolean or" is written as "||". So
your example becomes

  if i>500 && i<1000.

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
    let i += 1
endwhile

Any other way?

  normal G
  let numberofrows = line(".")

oh, and the above two statements can also be replaced by

        let numberofrows = line("$")

  normal gg
  let i = 1
  while i<=numberofrows
      if i>500 && i<1000
          " do something
      endif
      let i += 1
  endwhile

Regards,
Jürgen


Best regards,
Tony.
--
In Lexington, Kentucky, it's illegal to carry an ice cream cone in your
pocket.

Reply via email to