1 00:00:01,070 --> 00:00:02,970 So hello again and welcome back. 2 00:00:02,990 --> 00:00:09,530 This lesson is going to be a very quick wrap up of a few things that I think I still missed as I was 3 00:00:09,530 --> 00:00:10,930 going through the lessons. 4 00:00:11,060 --> 00:00:16,790 If you remember at the beginning of this section I told you that by the end of this section you should 5 00:00:16,790 --> 00:00:19,040 know almost everything that I'm doing. 6 00:00:19,070 --> 00:00:26,150 Any definition any declaration any specific target they didn't explain in the earlier lessons was supposed 7 00:00:26,150 --> 00:00:29,440 to be you know clear in this particular section. 8 00:00:29,600 --> 00:00:34,910 And as I was going through the lessons I realized there's still a few really quick stuff that I might 9 00:00:34,910 --> 00:00:39,670 have to explain them before we go to our upcoming sections. 10 00:00:39,680 --> 00:00:46,400 So with that in mind I'm going to go ahead into ex-cult and I should mention that while while I was 11 00:00:46,400 --> 00:00:53,000 in order coding the last lesson on this one I have between these two I have updated my export I'm using 12 00:00:53,300 --> 00:00:59,570 export 10 the CD version not the any of the Beatle versions so that doesn't really make a difference 13 00:00:59,810 --> 00:01:04,950 in what we are doing but you might notice some visual you know differences. 14 00:01:04,970 --> 00:01:14,390 In any case I'm going to make in your OP the wrath of swift and in Rap-Up see if I want to explain essentially 15 00:01:14,390 --> 00:01:16,160 a few different things. 16 00:01:16,400 --> 00:01:21,480 One of them is the difference between a float and a double. 17 00:01:21,500 --> 00:01:27,850 The other thing that I want to talk about is marking your application and that's essentially making 18 00:01:27,850 --> 00:01:29,080 the regions. 19 00:01:29,390 --> 00:01:36,970 And finally I want to talk about NSA numbers which is essentially a subclass of an that's of value. 20 00:01:36,980 --> 00:01:39,490 So let's go ahead and quickly have a look at those. 21 00:01:39,500 --> 00:01:45,230 The difference between a float and a double if it doesn't come up somewhere in the lesson so far is 22 00:01:45,230 --> 00:01:51,970 that float is tilted to a floating number two that were spaces and double is 64. 23 00:01:51,980 --> 00:01:59,300 So essentially double provides more numbers and more precision I could do a quick test for you saying 24 00:01:59,390 --> 00:02:01,840 let my float. 25 00:02:01,970 --> 00:02:10,240 Let's make that a float value of 1 divided by three fewer than one divide by three essentially becomes 26 00:02:10,250 --> 00:02:12,530 point 3 3 3 3 3 3. 27 00:02:12,600 --> 00:02:15,590 And in mathematics it becomes point 3 3 forever. 28 00:02:15,590 --> 00:02:21,710 In computers we have to eventually at some point stop that Wedel the same thing. 29 00:02:21,860 --> 00:02:24,440 I'm going to call this one my double. 30 00:02:24,830 --> 00:02:29,170 And that becomes the double of the same thing. 31 00:02:29,400 --> 00:02:30,840 Let's go ahead and princedom. 32 00:02:30,890 --> 00:02:40,020 So I'm going to say print float is the one that is going to be my float on under the cockpit not on 33 00:02:40,030 --> 00:02:40,520 in here. 34 00:02:40,520 --> 00:02:46,270 I'm going to say double is I don't want to put my up in the print file. 35 00:02:46,550 --> 00:02:51,380 So let's go ahead and run this project for application. 36 00:02:51,380 --> 00:02:56,270 This is one of the defense says they're visual things in the new ex-coach essentially shows you the 37 00:02:56,270 --> 00:03:00,660 region you have caused changes since the last save. 38 00:03:00,860 --> 00:03:07,850 So in any way any case float is now point or three up to like you know eight places I guess and double 39 00:03:07,850 --> 00:03:09,930 it's going to be a lot longer. 40 00:03:09,950 --> 00:03:14,240 And that's essentially for when you need more accuracy with your numbers. 41 00:03:14,300 --> 00:03:18,910 I usually get away with just using float values because you know that's. 42 00:03:19,250 --> 00:03:22,050 It does happen occasionally but not very often. 43 00:03:22,050 --> 00:03:24,110 I need a double value. 44 00:03:24,110 --> 00:03:26,760 The next thing is using a.. 45 00:03:26,820 --> 00:03:35,200 Number and this number is essentially every four encapsulates a value of the type integer flawed or 46 00:03:35,360 --> 00:03:42,950 or bully and even are assigned value into another entity which offers us a raise for formatting values 47 00:03:43,310 --> 00:03:49,760 and ways for using the value of that time to communicate that value with backbends or different places 48 00:03:50,170 --> 00:03:56,690 and this number is a subclass of an asset value like dimension and values and a value for maintaining 49 00:03:56,690 --> 00:04:03,290 things such as a struct or things such as C.G. points or CGI Rexes or all things that you're going to 50 00:04:03,290 --> 00:04:04,460 see in writing. 51 00:04:04,610 --> 00:04:05,930 Our next section. 52 00:04:06,050 --> 00:04:13,280 But for here all I want to do is I want to use this number two to formats my double in two different 53 00:04:13,280 --> 00:04:15,000 ways of showing it. 54 00:04:15,010 --> 00:04:17,510 I don't want to see it the decimal points. 55 00:04:17,510 --> 00:04:20,990 Maybe I want to see it in a scientific method or other ways. 56 00:04:21,020 --> 00:04:29,270 So to do that I'm going to go ahead and say let's use a large double and I'm going to say large double 57 00:04:29,300 --> 00:04:34,790 is my number one deployed by one through the power of so many many many numbers. 58 00:04:34,790 --> 00:04:37,210 A very very large value. 59 00:04:37,220 --> 00:04:44,000 So the next thing is I'm going to say Let my and this number and what I'm going to make to become any 60 00:04:44,180 --> 00:04:50,640 number of the value and the value is this one the very large one. 61 00:04:50,930 --> 00:04:51,580 And now this. 62 00:04:51,580 --> 00:04:55,550 And this number allows me to do things such as formatting them. 63 00:04:55,550 --> 00:05:04,050 So for instance I could go ahead and say my form either form or other it becomes a number for my other 64 00:05:05,320 --> 00:05:14,280 and I'm going to go ahead and say my form either god number or style is going to be number four. 65 00:05:14,300 --> 00:05:16,940 Neither does the style dots. 66 00:05:17,330 --> 00:05:24,830 And we could look at different ways of showing Clancey showing give the decimal ordinal roll values 67 00:05:24,860 --> 00:05:31,840 or like scientific and religious scientific for now and then they could say I could say Let let's call 68 00:05:31,840 --> 00:05:35,050 it the result value and this is going to be a string. 69 00:05:35,240 --> 00:05:40,740 I'm going to say that's going to be my form are there not a string of. 70 00:05:41,050 --> 00:05:43,640 And a number and that is my answer. 71 00:05:43,640 --> 00:05:50,500 Number two is essentially saying get the number that is produced of a large double called my larger 72 00:05:50,520 --> 00:05:58,160 number get the number of IT COME both into a string using a format there that converts values into a 73 00:05:58,160 --> 00:05:59,740 scientific style. 74 00:05:59,990 --> 00:06:01,180 Put it in the reservoir. 75 00:06:01,190 --> 00:06:08,210 And of course they could go ahead and say preens rez is Reds land and not this holiday. 76 00:06:08,240 --> 00:06:14,300 It's there is and we get that warning is obviously because it has value is optional. 77 00:06:14,300 --> 00:06:18,160 And I think optional 3.3 retreat is the power of 10. 78 00:06:18,170 --> 00:06:24,080 And if I wanted I could simply go ahead and say it's an unwrapped optional so that thing doesn't happen 79 00:06:24,080 --> 00:06:24,690 anymore. 80 00:06:24,860 --> 00:06:26,710 So I can run it for more time. 81 00:06:26,870 --> 00:06:29,570 And now we will see three point three. 82 00:06:29,600 --> 00:06:34,990 The power of 10 and that's a scientific way of showing this number. 83 00:06:35,510 --> 00:06:41,910 Let's try another one let's say your style I want is let's say currency. 84 00:06:41,930 --> 00:06:45,950 I honestly don't know what's the difference between crying and saying crunchie accounting so we can 85 00:06:45,950 --> 00:06:47,100 try both of them. 86 00:06:47,270 --> 00:06:51,770 So currency is going to be separated by every tear. 87 00:06:51,770 --> 00:06:56,320 The number I'm guessing yes is going to be dollars 9:33 I guess. 88 00:06:56,320 --> 00:06:57,890 Billion 333. 89 00:06:57,890 --> 00:06:59,330 So on and so forth. 90 00:06:59,510 --> 00:07:04,840 And there's another one currency Konting Let's see what's the difference between this one and one. 91 00:07:04,860 --> 00:07:09,020 So depending on the sign that you might need you could use any of those up. 92 00:07:09,060 --> 00:07:14,000 Now with that in mind the last thing was marking or regions. 93 00:07:14,180 --> 00:07:16,350 So a lot of times in your court. 94 00:07:16,370 --> 00:07:19,280 And that is in just one single file. 95 00:07:19,340 --> 00:07:24,420 You want to be able to separate your code into separate pieces for instance. 96 00:07:24,440 --> 00:07:31,280 I have a region up there that is my variable declarations and then I have another region which is my 97 00:07:31,280 --> 00:07:32,360 delegates. 98 00:07:32,480 --> 00:07:37,430 And then when I have another region which is I don't know my method definitions. 99 00:07:37,580 --> 00:07:45,950 So for each of these we essentially introduce a new region on industry if we do it it's my comments 100 00:07:46,040 --> 00:07:48,480 Mark or capital letters. 101 00:07:48,650 --> 00:07:50,560 And then in front of the market you're right. 102 00:07:50,570 --> 00:07:56,450 I don't know valuables it's not the moment they do this up here in the selections I could actually see 103 00:07:56,450 --> 00:08:01,910 it showing up that you know if I'm here at the bottom of my court and I both too valuable it pushes 104 00:08:01,910 --> 00:08:05,630 me up they're there to put different types of marks as well. 105 00:08:05,630 --> 00:08:10,210 One of them is called the Mark sorry it's called to do. 106 00:08:10,400 --> 00:08:15,340 And that's essentially something you have to do in here. 107 00:08:15,440 --> 00:08:20,330 That's essentially making your way for you to know that these are the things that you still have to 108 00:08:20,330 --> 00:08:21,430 implement. 109 00:08:21,510 --> 00:08:27,620 So could go ahead on that one and there's another one called The Fix me which is essentially something 110 00:08:27,620 --> 00:08:29,480 that has gone wrong. 111 00:08:29,480 --> 00:08:30,700 You can write yourself. 112 00:08:30,710 --> 00:08:34,110 I don't know let's put this at the bottom of the code so here. 113 00:08:34,250 --> 00:08:39,060 And if I go to selection's I say overawing there is something you have to fix in here. 114 00:08:39,110 --> 00:08:44,510 It's a very good way of organizing your call and then reminding yourself of things that are coming up 115 00:08:44,750 --> 00:08:51,680 just like how you use comments simply for reading different things and knowing what's going on and you 116 00:08:51,680 --> 00:09:00,020 could use Mark to do and fix me to a specifically you know look for something that you want to do if 117 00:09:00,020 --> 00:09:03,740 you want to use these in Objective C it's a little bit different. 118 00:09:03,740 --> 00:09:11,600 It's called tracking you more March and that's how we essentially make different regions even in Objective-C. 119 00:09:11,690 --> 00:09:16,410 But I'm guessing that for the most part you guys will be doing Strief from now on. 120 00:09:16,430 --> 00:09:24,570 So our difference between float and double are using a number on using regions with daddy in mind. 121 00:09:24,590 --> 00:09:25,490 Let's move on.