Tom Caylor wrote:
> ...
> Actually, it seems we could do this by writing GEN2 to use GEN's
> "filter" method as follows:
>
> begin GEN2(n)
>   i = 1
>   do until i = n
>     generate "character sequence i"
>     run "character sequence i" through a fortran compiler
>     if the result is valid
>       output "character sequence i"
>     else
>       i = i + 1
>     end if
>   end do
> end GEN2
>

Oops, actually it needs to do the following:

begin GEN2(n)
  i = 1
  j = 0
  do until j = n
    generate "character sequence i"
    run "character sequence i" through a fortran compiler
    if the result is valid
      output "character sequence i"
      j = j + 1
    end if
    i = i + 1
  end do
end GEN2

Tom


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Everything List" group.
To post to this group, send email to everything-list@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/everything-list
-~----------~----~----~----~------~----~------~--~---

Reply via email to