Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,390 --> 00:00:01,540
Well, hello there.
2
00:00:01,560 --> 00:00:10,200
And in this video, we are going to talk about something that is called EAF or basically and of file.
3
00:00:11,010 --> 00:00:17,420
So remember the backslash zero that was used for strings to indicate the end of a string?
4
00:00:18,360 --> 00:00:24,840
So the Backslash Zero character was used to indicate the end of a particular string.
5
00:00:25,620 --> 00:00:30,840
So something very similar to this concept will also apply for files.
6
00:00:31,800 --> 00:00:38,820
We need a way to represent the end of a file and there is a special character that is being used for
7
00:00:38,850 --> 00:00:46,080
exactly this task, just like the backslid zero four strings, we will use a special character called
8
00:00:46,080 --> 00:00:50,580
EAF that indicates the end of a given file.
9
00:00:51,130 --> 00:00:55,570
Usually the value of this special character is just minus one.
10
00:00:56,430 --> 00:01:03,660
But please note that although there is some similarity, there is a major difference between the backslash
11
00:01:03,660 --> 00:01:10,560
zero four strings in C and the EAF character used to indicate the end of the file.
12
00:01:11,190 --> 00:01:17,670
And the difference is that a backslash zero is actually stored as part of the string.
13
00:01:17,850 --> 00:01:20,160
OK, we've seen it as the last character.
14
00:01:21,730 --> 00:01:29,320
But the EAF character at the end of final indicator is actually not store this part of the file.
15
00:01:29,680 --> 00:01:38,420
The EAF character is basically not stored at the end of the file as the Backslash Zero does, OK?
16
00:01:38,470 --> 00:01:44,110
It's simply just an indicator to the lower level system that this is it.
17
00:01:44,200 --> 00:01:45,550
This is the end of the file.
18
00:01:45,820 --> 00:01:46,390
All right.
19
00:01:47,140 --> 00:01:55,540
And the reason for that is that EAF is simply some sort of ESP. fire to indicate to another layer.
20
00:01:55,550 --> 00:02:02,410
We are not going there in these course, probably, but it is just an indicator to a lower level to
21
00:02:02,410 --> 00:02:09,700
specify that we reached the end of these given file and we can basically make any conclusions, make
22
00:02:09,700 --> 00:02:11,110
some conclusions out of it.
23
00:02:11,350 --> 00:02:17,440
OK, that's much more advanced topic, but at least you should be aware with just the basic the overall
24
00:02:17,440 --> 00:02:21,070
idea of working with end of files.
25
00:02:22,570 --> 00:02:29,650
So simply said, we can't read all the characters of a particular file by using some wire loop and some
26
00:02:29,970 --> 00:02:36,820
get s f getsy function until we reach a character that is equal to EAF.
27
00:02:37,240 --> 00:02:40,930
I will show you a nice example in the next video.
28
00:02:42,140 --> 00:02:46,380
And yeah, OK, so yeah.
29
00:02:46,390 --> 00:02:53,380
So just remember that EAF will be represented as a character that specifies the end of the file.
30
00:02:53,650 --> 00:03:02,380
But this character is not actually part of your given file because it is just an indicator to the lower
31
00:03:02,410 --> 00:03:03,580
level system.
32
00:03:04,510 --> 00:03:06,610
So yeah, this is it for this video.
33
00:03:06,610 --> 00:03:10,930
Guys, I hope I made it very clear to you and.
34
00:03:11,830 --> 00:03:12,400
Yeah.
35
00:03:12,580 --> 00:03:14,470
So yeah.
36
00:03:14,590 --> 00:03:15,830
Thank you so much for watching.
37
00:03:16,210 --> 00:03:23,050
And now, just before we move on, one thing that I also want you to know is that there is also a function
38
00:03:23,050 --> 00:03:31,450
that is called F EAF, which means file and the file and these function basically gets a pointer to
39
00:03:31,450 --> 00:03:31,940
a file.
40
00:03:31,960 --> 00:03:33,190
OK, you can see that here.
41
00:03:33,190 --> 00:03:36,430
We will specify probably VFP, OK?
42
00:03:36,940 --> 00:03:43,190
And it will tell us either the current position is the end of the file or not.
43
00:03:43,750 --> 00:03:46,940
So in what situation it will be used.
44
00:03:46,960 --> 00:03:51,130
So for example, you have like you can use the for you can use these function.
45
00:03:51,600 --> 00:03:57,910
For example, you would like to know as long as let's remove it from here, as long as you didn't reach
46
00:03:57,910 --> 00:04:00,280
the end of the file so you can specify it like this.
47
00:04:00,280 --> 00:04:06,040
So file while while you haven't reached the end of the file.
48
00:04:06,040 --> 00:04:17,200
So f youcef f o f f b so as long as you didn't reach the end of the file, you will be doing the body
49
00:04:17,200 --> 00:04:18,070
of this loop.
50
00:04:18,280 --> 00:04:19,500
In this case, I don't know.
51
00:04:19,630 --> 00:04:21,320
I don't know what you want to write here.
52
00:04:21,340 --> 00:04:22,630
Let's go like some code.
53
00:04:23,050 --> 00:04:23,590
That's it.
54
00:04:24,010 --> 00:04:31,300
OK, so these while Loop will specify, as long as you didn't reach the end of the file, keep on doing
55
00:04:31,300 --> 00:04:31,930
some code.
56
00:04:32,200 --> 00:04:38,590
And once you do reach the end of the while, the condition is going to be false and you will move out
57
00:04:38,590 --> 00:04:39,580
of the while loop.
58
00:04:40,120 --> 00:04:43,300
So thank you guys for watching Youcef F off.
59
00:04:43,450 --> 00:04:44,140
That's it.
60
00:04:44,140 --> 00:04:45,820
Until the next time by.
5835
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.