1 00:00:13,590 --> 00:00:18,450 Hello and welcome to the golden programming language course in this session. 2 00:00:18,480 --> 00:00:21,380 We want to talk about data types concept. 3 00:00:25,970 --> 00:00:27,430 Data types and go. 4 00:00:28,490 --> 00:00:36,380 The type of a variable determines how much space it occupies in storage and how the bead pattern is 5 00:00:36,380 --> 00:00:37,880 stored is interpreted. 6 00:00:39,140 --> 00:00:47,660 Data types specify the type of data that a valid go variable can hold in go language. 7 00:00:47,930 --> 00:00:56,510 The type is divided into four categories, which are as follows First, basic type numbers string and 8 00:00:56,510 --> 00:01:05,540 Boolean come under this category second aggregate type array and strikes come under this category. 9 00:01:06,470 --> 00:01:12,710 Third, reference type pointers, slices, maps, functions and channels. 10 00:01:12,710 --> 00:01:20,720 Commander This category and force interface type interface is a type in go, which is a collection of 11 00:01:20,720 --> 00:01:21,950 method signatures. 12 00:01:26,410 --> 00:01:29,560 Basic data type here. 13 00:01:29,770 --> 00:01:33,490 We will talk about basic data types in the go language. 14 00:01:34,450 --> 00:01:42,460 The basic data types are folder categorized into the three subcategories, which are numbers Bosnians 15 00:01:42,640 --> 00:01:43,720 and Airstreams. 16 00:01:45,460 --> 00:01:47,860 First, we will talk about numbers. 17 00:01:48,460 --> 00:01:56,470 Numbers are divided into the three subcategories that are integers floating point numbers in complex 18 00:01:56,470 --> 00:01:57,010 numbers. 19 00:02:00,820 --> 00:02:01,690 Integers. 20 00:02:03,520 --> 00:02:11,500 Integers are used to twist or whose numbers go, has several built in integer types of varying size 21 00:02:11,500 --> 00:02:20,590 of the storing Sine and L.S. integers, both signed and unsigned integers are available as the predefined 22 00:02:20,590 --> 00:02:26,050 architecture independent integer types is shown in the diagram below. 23 00:02:26,560 --> 00:02:33,220 The signed integer is represented by INT and the unsigned integer is represented by you. 24 00:02:33,220 --> 00:02:42,850 Int signed integer includes Int Int eight and sixteen in thirty two and and 64. 25 00:02:44,140 --> 00:02:48,130 The size of the generic end type is platform dependent. 26 00:02:48,490 --> 00:02:55,330 It is three bits wide on a 32 bit system and 64 bits wide on the 64 bit system. 27 00:02:55,840 --> 00:03:04,960 Unsigned integers include You ain't you int eight, you aren't sixteen, you ain't thirty two and unions 28 00:03:04,960 --> 00:03:05,680 64. 29 00:03:06,310 --> 00:03:09,200 The size of union type is platform dependent. 30 00:03:09,400 --> 00:03:15,340 It is 32 bits white on a 32 bit system in 64 bits wide and a 64 bit system. 31 00:03:16,720 --> 00:03:23,260 When you're working with integer values, you should always use the data type unless you have a good 32 00:03:23,260 --> 00:03:27,520 reason to use the sized or unsigned integer types. 33 00:03:29,770 --> 00:03:37,380 There are also a couple of alias number times which assign useful names to a specific data times by 34 00:03:38,020 --> 00:03:43,000 Alias for You eight and Rule Alias for entry to 35 00:03:45,940 --> 00:03:51,850 Byte in Go is an alias for you end eight, meaning it is an integer value. 36 00:03:52,570 --> 00:04:01,540 This integer value is of eight bits, and it'll represent one by in between zero dash two hundred and 37 00:04:01,540 --> 00:04:02,800 fifty five. 38 00:04:03,550 --> 00:04:07,390 A single byte, therefore, can represent ASCII characters. 39 00:04:08,230 --> 00:04:11,740 Go length does not have any data type of cache. 40 00:04:11,980 --> 00:04:19,090 Therefore, BI is used to represent the ASCII character in Go. 41 00:04:19,100 --> 00:04:24,400 Language is an alias for N32, meaning it is integer value. 42 00:04:25,090 --> 00:04:33,970 This integer value is meant to represent the Unicode Code Point A Rome is used to represent a Unicode 43 00:04:33,970 --> 00:04:41,560 character, whereas only ASCII characters can be represented solely by an entry to data type. 44 00:04:43,870 --> 00:04:47,170 Now go to this school program to do an example. 45 00:04:49,480 --> 00:04:51,430 First, go to Project Explorer. 46 00:04:51,820 --> 00:05:01,180 Create a folder named like data types and create a file inside. 47 00:05:01,180 --> 00:05:03,000 Eat like me. 48 00:05:04,090 --> 00:05:04,770 Just go. 49 00:05:06,700 --> 00:05:08,210 Define the package name. 50 00:05:08,500 --> 00:05:15,190 So the right package main and defined main function for me. 51 00:05:18,370 --> 00:05:23,230 In this case, we want to define two integer variables first. 52 00:05:23,710 --> 00:05:25,720 Eight bit unsigned integer. 53 00:05:25,990 --> 00:05:30,040 And second, define a 16 bit signed integer. 54 00:05:30,520 --> 00:05:43,060 So first, define via a U.S. eight and initialize it by, for example, 200. 55 00:05:44,350 --> 00:05:47,080 And this abilities variable FP. 56 00:05:49,330 --> 00:06:02,530 Hey, and go to the next line and define A. A value that, for example, via B and 16 and initialize 57 00:06:02,530 --> 00:06:09,670 it by the value minus fifteen thousand four hundred ninety two. 58 00:06:10,690 --> 00:06:14,830 And now go to the next line and display this variable f the. 59 00:06:17,000 --> 00:06:17,300 Be. 60 00:06:18,870 --> 00:06:19,170 OK. 61 00:06:19,300 --> 00:06:26,460 Reformat the court, save the project and execute the program, go to a terminal first, go to Project 62 00:06:26,460 --> 00:06:35,070 Folder, see the data types, killer screening and run the program by the comment go wrong. 63 00:06:35,760 --> 00:06:37,560 Does this mean that Google? 64 00:06:39,450 --> 00:06:41,490 Now we can see the output. 65 00:06:42,330 --> 00:06:48,120 First, we define a U.S. aid variable and initialize it by 200. 66 00:06:48,480 --> 00:06:57,870 And second, we define and end 16 variable and initialize it by the value minus fifteen thousand four 67 00:06:57,870 --> 00:06:59,190 hundred and thirty two. 68 00:06:59,250 --> 00:07:05,970 So we could define two variable by the type signed an unsigned integer in order not to prolong the time 69 00:07:05,970 --> 00:07:06,690 of decision. 70 00:07:06,840 --> 00:07:10,800 We will finish it and we will continue the content in the next session. 71 00:07:10,980 --> 00:07:11,500 Goodbye.