On Fri, 3 Mar 2006, Dave Burt wrote:

> I said earlier:
>>     #program ii
>>     #integer i
>>      for i in 0..10
>>         print *i
>>         if (i.>5) then break end
>>      end#do
>> 1;    print *i*i
>>     #end
>
> A bad guess. Swap the prints for putses like this:
>         puts *i
>      ...
> 1;    puts *i*i
>
> Any ideas for making "then break end" look more like "goto 1"?
>
> Cheers,
> Dave

     harp:~ > cat a.f
           program ii
           integer i
           do i=0,10
              print*,i
              if (i.gt.5) goto 1
           enddo
     1     print*,i*i
           end



     harp:~ > f77 a.f && a.out
      0
      1
      2
      3
      4
      5
      6
      36


     harp:~ > cat a.rb

     i = catch('1') do
       (0..10).each do |i|
         puts i
         throw '1', i if i > 5
       end
     end
     puts i * i


     harp:~ > ruby a.rb
     0
     1
     2
     3
     4
     5
     6
     36




-a

-- 
judge your success by what you had to give up in order to get it.
- h.h. the 14th dali lama