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(".")
  normal gg
  let i = 1
  while i<=numberofrows
      if i>500 && i<1000
          " do something
      endif
      let i += 1
  endwhile

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

Reply via email to