All language subtitles for 003 Primitive Types.en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:05,690 --> 00:00:06,690 Welcome back, everyone. 2 00:00:06,710 --> 00:00:11,370 And today's oratorio, we'll talk about primitive types in order to talk about primitive types. 3 00:00:11,420 --> 00:00:14,360 We'll be using Wrex Tester to provide some examples. 4 00:00:15,800 --> 00:00:23,630 So before we get into the types, let's talk about variables and constants as we will need these variables, 5 00:00:28,100 --> 00:00:32,870 variables or something you declare once throughout the program. 6 00:00:32,870 --> 00:00:35,840 And you can be they can be changed throughout the program. 7 00:00:36,350 --> 00:00:40,580 So variables are declared once and can. 8 00:00:42,070 --> 00:00:44,840 Be changed later on. 9 00:00:46,660 --> 00:00:48,070 And then we have constant. 10 00:00:50,380 --> 00:00:59,350 And constants are declared once and can not be changed later on. 11 00:01:02,980 --> 00:01:09,250 So this is declaring clarinet cost, and we'll begin with the keyword. 12 00:01:11,440 --> 00:01:18,850 KONST And then let's say an integer, and then let's just declare a simple integer up here. 13 00:01:22,160 --> 00:01:32,000 But first, let me explain the naming conventions, naming of variables or constants. 14 00:01:33,890 --> 00:01:37,890 So this is how you want to be naming your declared variables. 15 00:01:37,940 --> 00:01:51,140 So pretty much they have to start with the letter and then they can be followed by either a number or 16 00:01:51,140 --> 00:01:51,860 an underbar. 17 00:01:53,660 --> 00:02:02,660 So let me declare a simple integer or so, and my end is equal to one. 18 00:02:03,590 --> 00:02:09,140 You can also declare it, but I think int my int is equal to two. 19 00:02:09,710 --> 00:02:11,750 And then you can also do int my. 20 00:02:12,050 --> 00:02:14,270 And one is equal to three. 21 00:02:15,500 --> 00:02:22,400 So these are all possible ways of declaring something, pretty much. 22 00:02:22,850 --> 00:02:27,080 So let's also do that with our constants. 23 00:02:28,280 --> 00:02:36,180 However, I like declare my constants in all caps because they stand out and you can tell which item 24 00:02:36,380 --> 00:02:37,320 is of constant or not. 25 00:02:37,340 --> 00:02:41,000 So let's say a const and. 26 00:02:44,500 --> 00:02:46,270 And then this is equal to a hundred. 27 00:02:46,990 --> 00:02:49,990 So these are all possible declarations of your 28 00:02:53,110 --> 00:02:55,060 integers or, you know, whatever you're declaring. 29 00:02:56,110 --> 00:02:59,830 So that's that's those are the basics of how you can declare items. 30 00:03:00,220 --> 00:03:05,290 They have to start with a letter and then followed by either an underbar or a number. 31 00:03:05,350 --> 00:03:06,310 These are possible. 32 00:03:06,340 --> 00:03:08,470 They don't have to, but they can be. 33 00:03:08,480 --> 00:03:10,210 So can be. 34 00:03:12,760 --> 00:03:17,020 So now let's talk about our primitive types. 35 00:03:18,550 --> 00:03:20,230 These range from. 36 00:03:21,520 --> 00:03:22,800 So let me let me write them down. 37 00:03:23,230 --> 00:03:31,330 I'll be doing and float character. 38 00:03:33,980 --> 00:03:41,210 Let me throw in double right after float, and the most simplest of them all is bullion. 39 00:03:43,550 --> 00:03:45,380 So let's go through an integer. 40 00:03:46,310 --> 00:03:49,970 So and by default are 32 bits. 41 00:03:53,300 --> 00:04:01,910 And can hold numbers from a big number, so bear with me. 42 00:04:02,630 --> 00:04:03,710 Negative 12. 43 00:04:04,070 --> 00:04:04,490 Excuse me. 44 00:04:04,520 --> 00:04:05,420 That's not 2000. 45 00:04:06,820 --> 00:04:08,930 It's I think it's in the billions. 46 00:04:09,340 --> 00:04:16,730 Four, four, eight, three, and then six, four, eight to positive. 47 00:04:17,870 --> 00:04:18,590 OK. 48 00:04:18,950 --> 00:04:19,520 You know, first. 49 00:04:19,520 --> 00:04:24,920 No, I don't I don't know the exact way of pronouncing it, so I'm not going to try. 50 00:04:26,060 --> 00:04:28,160 And then six forty seven. 51 00:04:29,930 --> 00:04:32,750 So that is the range of what an integer can hold. 52 00:04:33,590 --> 00:04:34,970 It is by default signed. 53 00:04:38,030 --> 00:04:42,980 Which means they can have a negative numbers, as you may say. 54 00:04:46,150 --> 00:04:53,740 So know, let's declare let's do have a constant and a nonconsent of it for all of these. 55 00:04:53,770 --> 00:04:56,200 So that's the end 56 00:04:59,960 --> 00:05:00,640 and end. 57 00:05:02,550 --> 00:05:06,310 It's equal to one and the cost and 58 00:05:09,190 --> 00:05:10,630 the constant in, let's say. 59 00:05:12,540 --> 00:05:13,500 It's equal to two. 60 00:05:14,550 --> 00:05:16,080 So that's that's pretty much an end. 61 00:05:16,170 --> 00:05:17,250 That's pretty much what it will be. 62 00:05:18,210 --> 00:05:20,040 So let's move on to a float. 63 00:05:21,390 --> 00:05:26,940 So floats are by default, 32, 32 bit as well. 64 00:05:29,070 --> 00:05:30,780 And they can hold. 65 00:05:33,110 --> 00:05:39,530 Approximately negative three point four times. 66 00:05:41,790 --> 00:05:45,000 Let's see, I think it's 10 to the 38. 67 00:05:48,250 --> 00:05:54,760 And then two positive three point four times ten to 38. 68 00:05:54,880 --> 00:05:56,410 So a pretty, pretty big number. 69 00:05:58,810 --> 00:06:03,010 So how do we declare these is the same thing? 70 00:06:03,010 --> 00:06:09,700 Float a float is equal to two point five, six. 71 00:06:10,270 --> 00:06:13,260 And that, of course, they have to be followed by us. 72 00:06:13,300 --> 00:06:16,990 So let me write that down or ends with F. 73 00:06:20,650 --> 00:06:22,090 Other why is it. 74 00:06:22,280 --> 00:06:35,020 We'll assume it's a double, which A is just a much larger version of a float and a float also has is 75 00:06:35,020 --> 00:06:40,300 accurate to seven decimal units. 76 00:06:45,610 --> 00:06:49,210 So one, two, three, four, five, six, seven. 77 00:06:49,480 --> 00:06:58,120 So that's as far as as accurate as all get that constant flow float. 78 00:07:00,740 --> 00:07:10,100 My float equal to two O two point one, two, four, one five, so on. 79 00:07:11,510 --> 00:07:13,100 So lots of float. 80 00:07:14,630 --> 00:07:15,740 Let's go with the double. 81 00:07:17,750 --> 00:07:19,970 They are 32 bits. 82 00:07:20,120 --> 00:07:23,600 So these are excuse me, 64 bits. 83 00:07:24,710 --> 00:07:28,460 Hence them being larger than a float. 84 00:07:30,800 --> 00:07:31,970 Let me write it here. 85 00:07:32,450 --> 00:07:33,200 Decimal. 86 00:07:35,810 --> 00:07:46,700 So there are 30, 64 bit decimals, these hold very, very, very large number that I will not write. 87 00:07:47,960 --> 00:07:49,520 And they are accurate to. 88 00:07:52,330 --> 00:07:55,390 15 to 16 decimal units. 89 00:07:58,240 --> 00:08:04,180 So double, let's say a double. 90 00:08:07,320 --> 00:08:09,180 To your point, you know something? 91 00:08:11,760 --> 00:08:13,590 These do have the option to end with enough. 92 00:08:14,070 --> 00:08:17,550 They don't necessarily have to, but it's it's a choice. 93 00:08:19,140 --> 00:08:21,160 But I wouldn't it's it's not necessary. 94 00:08:21,160 --> 00:08:22,710 It's just, you know, it's possible. 95 00:08:26,870 --> 00:08:29,030 Then my double. 96 00:08:33,550 --> 00:08:34,060 There you go. 97 00:08:34,940 --> 00:08:38,590 That's that's a double for characters. 98 00:08:39,610 --> 00:08:52,990 They hold one value at a time and they can be anything from a letter to simple. 99 00:08:55,650 --> 00:09:07,260 And so let me let me go ahead and write that down, so character my car, a sequel to a then you can 100 00:09:07,260 --> 00:09:14,610 do a constant character, my care, my. 101 00:09:15,980 --> 00:09:16,670 Const. 102 00:09:21,250 --> 00:09:28,270 Care to signal to be actually, let me do this just to show that. 103 00:09:32,780 --> 00:09:35,360 Cost constant, constant. 104 00:09:37,150 --> 00:09:39,680 If Cosmosphere requires a value to be provided. 105 00:09:43,220 --> 00:09:45,280 I think this might be it. 106 00:09:49,230 --> 00:09:50,250 Constant. 107 00:09:53,310 --> 00:09:55,770 I declared it costs and somewhere that I. 108 00:09:58,150 --> 00:09:59,600 Need to take back pretty much. 109 00:10:00,440 --> 00:10:03,770 That's the area that I'm getting in, constant fear requires a value to be provided. 110 00:10:08,680 --> 00:10:09,580 Oh, excuse me. 111 00:10:09,610 --> 00:10:10,090 Right here. 112 00:10:11,920 --> 00:10:13,270 That should fix it. 113 00:10:14,910 --> 00:10:16,800 And I believe this can be enhanced as well. 114 00:10:16,830 --> 00:10:18,510 So let me put that back up there. 115 00:10:20,580 --> 00:10:27,000 So that's that's a character, Ken, one item at a time if you try to do to get in there. 116 00:10:29,010 --> 00:10:30,480 So now let's go to bullions. 117 00:10:31,890 --> 00:10:43,440 So Bill holds the value of true or false, and he sort of declare the same way, a bully in my bull 118 00:10:44,220 --> 00:10:48,150 sequel to True and have a constant one. 119 00:10:49,410 --> 00:10:50,040 That's true. 120 00:10:50,040 --> 00:10:53,680 Cost and Boulianne I. 121 00:10:57,130 --> 00:10:58,050 Which is equal to. 122 00:10:59,360 --> 00:11:00,140 False. 123 00:11:02,680 --> 00:11:03,400 There you have it. 124 00:11:03,730 --> 00:11:11,260 So these are our most basic types, the simplest ones like I can come off my head. 125 00:11:12,340 --> 00:11:15,070 There are slightly different versions of. 126 00:11:15,760 --> 00:11:18,130 So write these down right below. 127 00:11:20,170 --> 00:11:23,140 By doing this. 128 00:11:23,710 --> 00:11:33,250 So we have let's go with a eight bit version of ANENT. 129 00:11:36,320 --> 00:11:41,300 The ancient version of the end is called a bite. 130 00:11:44,460 --> 00:11:50,970 So these are by default signed excuse me, on signed. 131 00:11:54,250 --> 00:11:59,350 So I'll bite my bite is equal to 132 00:12:01,790 --> 00:12:11,140 so 120, the range here is from zero to 255. 133 00:12:14,000 --> 00:12:17,180 And then we can do a constant of these as well, so constant. 134 00:12:17,450 --> 00:12:24,140 But my cost bite sequel to 255. 135 00:12:25,610 --> 00:12:31,040 So now we have a I forgot to write the eight right there. 136 00:12:32,870 --> 00:12:34,400 So sixteen bit. 137 00:12:37,930 --> 00:12:42,140 Version of and it's called a short. 138 00:12:44,540 --> 00:12:50,840 And this goes from negative, so range is negative 32. 139 00:12:51,890 --> 00:12:55,910 And let me see the actual number behind it. 140 00:12:57,370 --> 00:12:59,000 Oh, 32. 141 00:13:03,950 --> 00:13:05,270 I'll come with it in a bit. 142 00:13:05,360 --> 00:13:06,410 Six, seven, eight. 143 00:13:07,070 --> 00:13:14,030 Or excuse me, seven, six, eight two thirty two, seven, six, seven. 144 00:13:19,210 --> 00:13:21,730 So this is the actual range. 145 00:13:23,500 --> 00:13:24,820 It is by default. 146 00:13:28,160 --> 00:13:33,080 Of course, signed, as you know, we have a negative up here, so it's got to be signed. 147 00:13:33,590 --> 00:13:39,920 So short my short cycle to only 200. 148 00:13:42,070 --> 00:13:44,620 Then costs. 149 00:13:48,050 --> 00:13:51,320 Short, I can't short. 150 00:13:53,480 --> 00:13:55,400 And that makes us think of 32. 151 00:13:58,060 --> 00:14:07,600 And I forget the equals sign here, and then our last one is a 64 bit version of an ant. 152 00:14:09,390 --> 00:14:11,100 And this is called a long. 153 00:14:13,920 --> 00:14:24,510 The range on the long is quite big, so I'll short it by going with negative nine point two times 10 154 00:14:24,720 --> 00:14:30,960 to the 18 to nine point two times 10. 155 00:14:33,180 --> 00:14:36,640 To the 18 as well, so that is the range. 156 00:14:39,650 --> 00:14:45,590 So it's long mile long and quite big number, I believe. 157 00:14:45,680 --> 00:14:47,960 I think that might be big enough. 158 00:14:47,990 --> 00:14:48,260 Yep. 159 00:14:49,430 --> 00:14:52,190 So then caused along. 160 00:14:56,110 --> 00:14:57,580 I cast long. 161 00:15:01,040 --> 00:15:02,690 I think that should be within range. 162 00:15:03,230 --> 00:15:04,460 And so vengo. 163 00:15:05,420 --> 00:15:09,020 So these are are different versions. 164 00:15:11,600 --> 00:15:15,570 Of a far integer, pretty much. 165 00:15:16,640 --> 00:15:21,830 And then we have unsigned versions of these, so. 166 00:15:23,710 --> 00:15:33,180 Let me make a comment on Scient versions. 167 00:15:34,840 --> 00:15:43,210 So we have you and you long and you short. 168 00:15:44,320 --> 00:15:45,580 So these are all unsigned. 169 00:15:45,730 --> 00:15:50,920 So meaning they go from pretty much zero to double of what their number is. 170 00:15:50,920 --> 00:15:57,400 So it's a short will go from zero to about 6400 or 64000. 171 00:15:57,400 --> 00:15:57,880 Excuse me. 172 00:15:58,930 --> 00:16:00,870 So these are also they're declare the same way. 173 00:16:00,880 --> 00:16:08,920 So you and I, you and as equal to, you know, something positive has to be a positive number. 174 00:16:09,970 --> 00:16:11,410 Otherwise, they will not accept it. 175 00:16:12,790 --> 00:16:16,750 Short by short, you short 176 00:16:19,810 --> 00:16:20,680 and then something. 177 00:16:21,880 --> 00:16:25,270 So if I put a negative here, it'll give me an error, as you may see. 178 00:16:27,490 --> 00:16:33,690 And then you long my along as you go to some number. 179 00:16:37,060 --> 00:16:49,510 We also have a signed version of our Vyt, so let me put this a signed version of it. 180 00:16:50,530 --> 00:16:53,170 And this is called as bait. 181 00:16:54,280 --> 00:16:56,110 And it's slowly just as bite. 182 00:16:56,530 --> 00:17:07,660 And then my -- bite to negative one toe the range here. 183 00:17:10,390 --> 00:17:15,320 Is one negative one to eight to one. 184 00:17:15,340 --> 00:17:16,750 Twenty seven. 185 00:17:19,080 --> 00:17:20,430 So that's what we have. 186 00:17:24,340 --> 00:17:27,220 So again, I'll repeat this again. 187 00:17:28,240 --> 00:17:28,900 Don't go. 188 00:17:29,530 --> 00:17:32,980 I think I've repeated, if I haven't, I'll say it, I'll say it once. 189 00:17:34,030 --> 00:17:35,530 So let's talk about overflowing. 190 00:17:36,250 --> 00:17:38,920 I don't think I've actually said it, so I'll do. 191 00:17:38,920 --> 00:17:58,750 The stumbling over flowing is when you try to assign a type a value to large for the container. 192 00:18:01,690 --> 00:18:17,350 So an example of this is let's go with a bite equal to one twenty nine cents, a nice bite goes from 193 00:18:19,030 --> 00:18:23,740 one twenty eight to one twenty seven or negative, 128 to 127. 194 00:18:24,100 --> 00:18:30,400 129 should be too large for it to hold till we get an error here if I drop this back to 127. 195 00:18:32,830 --> 00:18:33,820 It shouldn't work. 196 00:18:36,790 --> 00:18:38,350 Oh, excuse me. 197 00:18:38,510 --> 00:18:42,880 I have to say, we have to have a variable or a name for it. 198 00:18:43,990 --> 00:18:45,730 My bite. 199 00:18:47,100 --> 00:18:48,270 And then let's just do another one. 200 00:18:49,620 --> 00:18:52,040 So let me do that again to 129. 201 00:18:52,070 --> 00:18:52,890 We should get an error. 202 00:18:54,270 --> 00:18:58,170 It's too it's too large for it to hold, so it cannot hold it. 203 00:18:58,860 --> 00:19:01,290 So I'm a coming this out as an example. 204 00:19:06,960 --> 00:19:13,290 So that is what overflowing is a stubborn about excuse me, let's talk about scoping. 205 00:19:15,180 --> 00:19:16,500 So scoping. 206 00:19:18,330 --> 00:19:21,450 Is trying to. 207 00:19:22,950 --> 00:19:32,760 Well, it's not really something, it's just a school with scope is where you can access. 208 00:19:35,260 --> 00:19:42,670 Variables or values, pretty much so values, because you can access costs as well, we can access values 209 00:19:42,670 --> 00:19:43,240 from. 210 00:19:43,660 --> 00:19:47,410 And so let's let's let's give you a let me give you an example. 211 00:19:47,440 --> 00:19:51,070 So if we have a statement, I'll be using F statements. 212 00:19:51,670 --> 00:19:53,420 So I have to tell you what they are. 213 00:19:53,440 --> 00:19:59,830 So they are statements that if a condition is met, a certain task will be done. 214 00:19:59,860 --> 00:20:05,620 So let me let me say and test. 215 00:20:05,650 --> 00:20:07,420 And it's equal to 10. 216 00:20:08,260 --> 00:20:11,490 If test and is equal to 10. 217 00:20:13,630 --> 00:20:17,470 So the difference I'm going to tell you the difference between this equal sign and this equals sign. 218 00:20:17,920 --> 00:20:20,950 So this equals sign says that tests aren't as equal to 10. 219 00:20:21,940 --> 00:20:23,590 This equals sign as checking. 220 00:20:26,720 --> 00:20:28,730 Checking if test. 221 00:20:30,020 --> 00:20:34,130 Pente is equal to 10. 222 00:20:34,220 --> 00:20:35,390 So if I made this. 223 00:20:36,320 --> 00:20:37,910 Let me finish a statement first. 224 00:20:37,910 --> 00:20:43,250 So let's say if it is equal to 10, let's have the console, right? 225 00:20:44,980 --> 00:20:45,500 I'm 10. 226 00:20:49,510 --> 00:20:56,200 So so this should one should say I'm 10, not to make this zero. 227 00:20:56,590 --> 00:20:57,610 They should not run into that. 228 00:20:57,850 --> 00:20:59,830 So it's pretty much checking for a condition. 229 00:20:59,980 --> 00:21:02,630 The condition is here where the tenant is equal to 10. 230 00:21:04,280 --> 00:21:05,480 So Nutro. 231 00:21:05,860 --> 00:21:08,440 So let me go back to scoping. 232 00:21:09,310 --> 00:21:17,860 So scoping is where you can access a value from the if statement as within the the main function. 233 00:21:18,190 --> 00:21:21,940 So if statement will have any will have access to anything above it? 234 00:21:21,940 --> 00:21:23,110 Pretty much so. 235 00:21:23,560 --> 00:21:26,480 Anything declared above it, I'll have access to. 236 00:21:26,500 --> 00:21:28,810 So let me go back to my end to one. 237 00:21:28,840 --> 00:21:29,530 I'll change it. 238 00:21:30,850 --> 00:21:31,690 And that point it again. 239 00:21:32,050 --> 00:21:33,340 So I'll print first. 240 00:21:35,740 --> 00:21:36,820 Let me have the console. 241 00:21:36,820 --> 00:21:37,240 Right. 242 00:21:41,170 --> 00:21:49,540 So on the right line, my end should print one. 243 00:21:52,290 --> 00:21:53,460 It's capital I. 244 00:21:55,350 --> 00:21:56,730 So am I, and a third one. 245 00:21:56,940 --> 00:22:02,010 And now if we added my end so my aunt is not equal to 25. 246 00:22:03,000 --> 00:22:04,230 And now let's write it again. 247 00:22:08,930 --> 00:22:09,440 My. 248 00:22:10,460 --> 00:22:16,280 And so now I should have won and then 2005 at the very end, because we can edit it, we have access 249 00:22:16,280 --> 00:22:16,550 to it. 250 00:22:17,870 --> 00:22:20,330 So now let me declare an integer here. 251 00:22:21,050 --> 00:22:24,260 So and new. 252 00:22:24,260 --> 00:22:29,000 And it's equal to negative to negative one. 253 00:22:29,540 --> 00:22:29,810 All right. 254 00:22:29,960 --> 00:22:32,450 And we can run it. 255 00:22:32,660 --> 00:22:33,170 That's fine. 256 00:22:34,070 --> 00:22:39,250 So now let's try to access that integer from outside of here outside the statement. 257 00:22:39,270 --> 00:22:43,860 So let's say you and it's now equal to 20. 258 00:22:45,200 --> 00:22:52,580 It'll give me an error because I'm trying to access it outside of the scope of it went. 259 00:22:52,940 --> 00:22:57,200 And the nuance scope is only for the statement. 260 00:22:58,100 --> 00:22:59,930 So I can access it only within here. 261 00:23:00,260 --> 00:23:02,330 Or if I were to declare something within here. 262 00:23:02,390 --> 00:23:04,340 So let's say if. 263 00:23:06,050 --> 00:23:12,050 Let's say to a bully, and so let me declare bully in my 264 00:23:14,840 --> 00:23:15,530 no bull. 265 00:23:18,530 --> 00:23:21,020 So my new bullion is equal to true. 266 00:23:22,100 --> 00:23:31,040 So if my new bullion sequel to True, this can also be done this way. 267 00:23:31,050 --> 00:23:32,840 So let me show you another example. 268 00:23:32,850 --> 00:23:41,300 If my new beau that checks, if it's true, Salame check for true. 269 00:23:42,170 --> 00:23:43,710 And then this will be for a false. 270 00:23:43,730 --> 00:23:45,620 So exclamation mark. 271 00:23:47,480 --> 00:23:48,350 So my. 272 00:23:49,870 --> 00:23:50,990 No bull. 273 00:23:52,240 --> 00:23:52,930 This would be. 274 00:23:54,570 --> 00:23:55,390 For false. 275 00:23:57,370 --> 00:24:00,340 So this is just another way of doing exactly what I did here. 276 00:24:01,060 --> 00:24:07,490 So let's say let's do that so minuet. 277 00:24:07,510 --> 00:24:10,900 So let's change Menuet now. 278 00:24:11,320 --> 00:24:13,330 And now it goes to negative 10. 279 00:24:14,230 --> 00:24:15,550 And let's have concentrated. 280 00:24:20,490 --> 00:24:21,450 New and. 281 00:24:23,620 --> 00:24:24,510 The comment that out. 282 00:24:26,160 --> 00:24:30,900 So as you may see, this is within the scope because everything that I'm using here is declared above 283 00:24:30,900 --> 00:24:35,940 it within this here, within the these brackets. 284 00:24:36,060 --> 00:24:40,260 If I try to exit here, I'm outside of the brackets. 285 00:24:40,920 --> 00:24:44,580 And so I'm outside of the scope because it was declared here. 286 00:24:44,850 --> 00:24:48,450 Now I can access this integer if I declare it above. 287 00:24:48,480 --> 00:24:50,490 So let's move it up there. 288 00:24:51,750 --> 00:24:56,810 This will give won't give me an error anymore because it's declared within its own scope. 289 00:24:56,820 --> 00:24:58,740 So this would be in scope of this. 290 00:25:01,620 --> 00:25:03,180 Tell me, move that back over here. 291 00:25:08,050 --> 00:25:08,590 All right. 292 00:25:10,820 --> 00:25:15,140 So that is pretty much scoping and what you need to know about it. 293 00:25:17,600 --> 00:25:19,790 Finally, put this an example of. 294 00:25:22,690 --> 00:25:24,970 Of that scope. 295 00:25:27,570 --> 00:25:33,450 All right, so that is pretty much what you guys need to know about, you know, primitive types and 296 00:25:33,750 --> 00:25:41,340 scoping and overflowing for you guys, I would like for you all to mess around with it, have some fun. 297 00:25:41,820 --> 00:25:42,960 Used to have statements. 298 00:25:44,190 --> 00:25:48,810 There are, you know, right now one of our first big things that we're learning. 299 00:25:49,290 --> 00:25:55,470 So play around with it, mess around with it, declare your own your own variables, get familiar with 300 00:25:55,470 --> 00:25:56,340 the naming convention. 301 00:25:56,340 --> 00:26:05,670 You know, you can do many things with it, but just go around going back on to mess around with it 302 00:26:05,670 --> 00:26:07,110 and just have some fun. 303 00:26:08,820 --> 00:26:11,540 So that concludes for today. 304 00:26:11,550 --> 00:26:17,040 That concludes today's video and the next tutorial we'll learn about type conversion. 305 00:26:17,820 --> 00:26:18,600 Thanks for watching. 25881

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.