1
00:00:01,280 --> 00:00:09,980
How to do the for loop in org here it is structure and it is quite easy commands inside for all are

2
00:00:10,040 --> 00:00:13,340
executed if condition is true.

3
00:00:14,420 --> 00:00:19,100
At the end of each loop increment or decrement part is done.

4
00:00:19,490 --> 00:00:27,000
And before any command in first loop is executed in its position of some variables can be done.

5
00:00:28,010 --> 00:00:31,560
If this description is hard to understand Don't be afraid.

6
00:00:31,560 --> 00:00:38,980
Here is some example in interlineation part we have I equals one.

7
00:00:39,180 --> 00:00:49,080
So that means before any command in for loop body will be on a value of variable I will be set to 1

8
00:00:50,190 --> 00:01:00,250
then we are asking a value of variable i is less than or equal to 10 Yes it is.

9
00:01:00,570 --> 00:01:10,420
So the for loop body will be executed and will bring to screen how fold by number 1 Danto value of variable

10
00:01:10,510 --> 00:01:13,080
i is incremented by 1.

11
00:01:13,360 --> 00:01:20,260
And again we are asking if value of variable i is less than or equal to 10.

12
00:01:20,590 --> 00:01:24,470
Yes because 2 is a less than 10.

13
00:01:24,850 --> 00:01:34,150
And then by the fourth row is executed and we are continuing until the condition is through OK.

14
00:01:34,170 --> 00:01:41,610
Let's practice for loop on some example but Firstly check how our final table looks like.

15
00:01:41,610 --> 00:01:46,390
Let's say if we want for each record low for each field.

16
00:01:46,680 --> 00:01:54,830
So we need to create in main or section for rope.

17
00:01:54,980 --> 00:01:59,900
So in Maine where exception played for top

18
00:02:04,520 --> 00:02:09,950
and dead for a loop they'll go through each field

19
00:02:14,110 --> 00:02:22,130
and how many times this loop will be random number of fields.

20
00:02:22,240 --> 00:02:29,070
So this is why we are specifying in condition I have less than or equal to number of fields.

21
00:02:30,470 --> 00:02:35,840
And inside for a body vivo print field.

22
00:02:40,690 --> 00:02:44,230
That means that we need to specify print

23
00:02:47,610 --> 00:02:47,970
field

24
00:02:51,370 --> 00:02:58,280
then we will print number of that field which is represented by I.

25
00:02:58,900 --> 00:03:06,490
And then the value of a field which is represented by the last time I

26
00:03:12,800 --> 00:03:24,800
if here at hand is we see the output first record has filled one name field to age fill three unit.

27
00:03:25,070 --> 00:03:33,110
Second the record has Field 1 Peter Field to 50 and field 3 I-T and so on.

28
00:03:34,990 --> 00:03:41,560
So one time or for each record which is in our case the fourth line.

29
00:03:41,830 --> 00:03:48,910
So for each line in the loop Sorry times as number of results is equal to three in each line.

30
00:03:49,090 --> 00:03:56,570
And of course in each loop the printed fill a number of field and the value of the field.
