Re: Please help with Formatting Programme Output

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

Chris Bensler wrote:

I made a mistake.
repeat() will not accept a zero count (as would be in the first call to
look_at())

Easy fix:
function repeat0(object x, integer count)
  if count then
    return repeat(x,count)
  else
    return ""
  end if
end function

integer tabs
tabs = 0

function look_at(sequence path_name,sequence entry)
  if k=0 then printf(1,"%s\n\n",{path_name}) k=1 end if
  printf(1,"%s%s\n",{repeat0('\t',tabs),entry[D_NAME]})
  if find('d',entry[D_ATTRIBUTES]) then
    tabs += 1
  end if
  return 0
end function

Chris Bensler
~ The difference between ordinary and extraordinary is that little extra ~
http://empire.iwireweb.com - Empire for Euphoria

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

Search



Quick Links

User menu

Not signed in.

Misc Menu