hey guys equipment taking and in this Lecture, we're going to cover each the
data tapes and variable Hendley in function so and pitch be variable that it
is can be broken down three different categories scale or compose in a
special [NOISE] so the scale or as a single unit of the data and this
enclosed variables like the string which is text entire which is a whole number
flowed which is a fractional (Dallas Website Development)number and bully in which is a zero or a one
and it could also be represented as truth for one hour of false for a zero
next, we got composite which is an error an object and the or a basically
holds multiple values like you see here separate it from the common and the
object refers to the instance of the class so if we have a class claimed
the movie, for example, we can then say object because of your key and then the class
and that will create the object instance of that class so that's how we
create an object data type finally have a special and under special we have
a no which is basically means nothing or no valley at all and I'm not a one
is a resource which can hold special values like database connections open
files etc so these are the most common genotypes you get to encounter and teach
I now let's actually create some of these variables and that we can play
around with them so the first one time get any flying is a string variable
and so this is just going to be information about a matrix smelly I think
it's a good way to demonstrate all kinds of different [a COUGH] that a types
and teach me so this one is it going to flow and we find some was true
[UH] ~~~~~~~ and they're not going to create a more on and this one is going
to be associative or a and it's going to have actor names and the rules
the played in the movie and so I was going to put a couple of game and year
more beers for the end the that's enough so that is going to be our
associative and then today is going to be a rate that I'm going to create a
classroom you leave I create an object main tricks use and they knew the keyword
followed by the class lane which is a movie and that's can create the object
the instance of the class and it is defined in our world ~~~~~~~ and finally
[SMACK] is defined a resource and this one is going to refer to the open
file [a COUGH] going to specify the directory where this text while is located
can be any x files so and so this one is going to become a resource now
let's go ahead and covers some of the variable handling functions and the
reason I want to show you this is because there's you want to have variable
functions or variable having functions and Picchu which give you all kinds
of the information about data types and other information about the
variables and as you can see the first ones to get the type and it does exactly
what it says I guess I did a type of the variable now we have is said which
checks if the variable has been initializing on said destroys variable and
then we can just down well these this little teach either table here and
just check out all these other variables and play around with audio variables
that we have just defined but I'm going to create a loop now and I'm going
to who's get die variable to get the information about all the variables
that we have just created to get the data type but before I do that I'm
actually going to define a new very people and is going to hold all these
variables in it are using it rains so I'm going to find a variable and data
and then I'm going to say a rape and I'm just going to put all these
variable names inside of this range you now we're going to use a for loop
to look through all these variables inside of the data rate and I'm going to
use a get type function today to type ii of these variables of a soulless
creative for loop
No comments:
Post a Comment