I use Unicon infrequently enough that it probably looks like another
language written in Unicon.  In the program below, I am running through 2
levels of directories to print the files in the 2nd level.  If you have any
suggestions on how to better take advantage of Unicon's features, I would
appreciate hearing them.

procedure main()
   infile := "c:/users/steve/documents/bom"
   in := open(infile,"r") | stop("Unable to open " || infile)
   while line := read(in) do {
      if line[1] ~== "." then {
         write("\r\l",line)
         afile := infile || "/" || line
         in2 := open(afile,"r") | stop("Unable to open " || afile)
         while line := read(in2) do {
            if line[1] ~== "." then write("   ",line,"
(",afile,"/",line,")")
         }
      }
   }
   close(in)
end

Thanks, Steve
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to