[ create a new paste ] login | about

Link: http://codepad.org/YHFr7qRD    [ raw code | output | fork ]

Ruby, pasted on Dec 1:
1
2
3
4
5
6
7
8
9
10
11
12
# for setting a value in some odd manner
value = begin
  final_value = 5
  puts "Some lengthy process"
  final_value
end

# or for looping
i = 0
begin
  puts "Hi there"
end while (i += 1) < 5


Output:
1
2
3
4
5
6
Some lengthy process
Hi there
Hi there
Hi there
Hi there
Hi there


Create a new paste based on this one


Comments: