Re: eprint.e and line wrap

new topic     » goto parent     » topic index » view thread      » older message » newer message

Probably cleaner ways, but this will tell you the number to increment at
the time of print.

CAUTION: Not Tested

function pluscount( integer a, integer b)
  if floor( a/b) = (a/b) then
  -- Basically, if remainder = 0
    return floor(a/b)
  else
  -- Otherwise, increment to cover remaining letters.
     return floor(a/b) + 1
  end if
end function

-- To Add Each Time. This handles all lengths and will increment only 1 if
--   length of printline is less than or equal to desired length

linecount = linecount + plusscount(length(printline),80)



 Joe Phillips, Assistant Director
 University Computing and Telecommunications
 Texas Wesleyan University     817-531-4284

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu