20 videos
111 minutes
Hello as they are, my name is {Joseph} and I welcome this new tutorial course haskell {} and, well this time we will see logical operators operators, comparison and arithmetic operators using this language. So, it is always very simple mind if for example we are working with numbers it is very very simple if we do {5 + 3}, then simply put that like a calculator to divide equally, if we find the rest
We can use these operators can thus use your service or you can call a function that is the equivalent, for example, here I put 5 and then I put the French quotes is the only way upside down and the other is the address divided by 2 Well I will leave the integer and if I put for example {5 mod 2} I will leave the residue or that rest, because here it is a function {div} for when we want to checks numbers
that are severable that such a residue is then all the other things is intuitive {5 * 9 e 3/7} is the goal, then this too can use this combined with brackets eg {7- (2 * 2)}, because there you have it not also be used parentheses Well now let's see the logical operators Haskell {} operates {true}, {false} must be capitalized, because I use {true} to dry, because you see not work because they are in lower case
buts if I put their case is there not, then the operators to say and abolition (y) are written like {&&} and condition (o) is written as {||} practically the same if we come from languages like Java and C ++ {} so {True && False} gives me a {False}, {True || False} to {True} meda if we ask questions {5 == 6} {False} if I put the {7 == 7} {True}, if we ask if they are different perhaps are accustomed to use this expression, = {},
but it is not matched this is done {7 / = 3} then 7 Other 3 {True} this is because like the combination when writing math really something different equal and then a backslash labeling her as this is what is different then simulate 7 3, for if {7> 3} {True} {7> = 7} if {7> 7} is {False}, there you have got is there you have it operators and logical comparison same happens with the lowest {4 < 9},
for it is {True) and remember that this can also be combined can ask {7 == (4 + 3)} is {True} if the ideal is to deny something in languages like (Java and C ++) what we do is for example something like {|} True, but this here does not work here it gets with {not} {True} or {False} then it must be with this operator {not}. Well, this has been this video and we have seen arithmetic operators to perform operations of numbers and logical operators
and compared to {true, false} interesting that if we want to add numbers that have different types because you can do it is not necessary to specify the types for example put {8 + 3.2} and there is no sum me to say anything, but this was a whole a decimal and interprets} {haskell but I could not do is add attributes that have different types for example {50 + 'hello'} because I do not concatenate
I get an error message and if I want to join two phrases such as { 'hello' + 'world'}, because I do not do anything because it is not done with the operator {+} so done with this operator, I have to put { 'hello' ++ 'world'} and always in quotes to understand that everyone is string there if you have the same type and can now be concatenated if they saw then to concatenate strings not put {+} {++} sets and to make operations
between different types of values must be the same type is something that is very strict in haskell {} with that issue if it is not the same kind rejects you ok so this is good for this video so I hope you like can give {like}, subscribe and share and see on these tutorials.
About the Author
Biography: Analyst-Programmer in different languages. Tutor PREMIUM platforms recognized worldwide as CodigoFacilito. Editor Cristalab articles. My YouTube Channel is sponsored by the ANAYA and LaTostadora publisher. I like to explain in detail and give several examples for the avoidance of doubt.