Questions tagged as 'else'

4
answers

If else with functions

It is possible to use a if-else with functions "function ();" example: if (a > 1){function Save();} else {function NoSave();} I just need to know if functions loaded in head work within if-else in scripts within...
asked by 26.02.2015 / 14:46
1
answer

Alternative for If / Else

I have the following code: private void maskedTextBoxEAN_Leave(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(maskedTextBoxEAN.Text)) if (!ValidaEAN13.CalculateChecksum(maskedTextBoxEAN.Text)) CaixaMensage...
asked by 13.08.2016 / 03:18
1
answer

Else does not work in PHP

I'm trying to use the code below, but else does not work. Returns the error Parse error: syntax error, unexpected 'else' (T_ELSE) <?php if ($status == 'True') ?> <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3"> &...
asked by 19.02.2017 / 01:12
2
answers

Doubts with the use of the IF / ELSE in C

When I run this code and type the gender = M or = F, all conditions are executed as expected. Already when I type sex = m or = f, only the first condition is met, regardless of the age value. Can anyone explain to me the right use and structure...
asked by 07.09.2018 / 09:06
2
answers

IF, ELIF and ELSE

I'm taking my first steps in Python, and I had a question in the if / else statement, trying to solve the following exercise: "Based on input data for a person's height and gender, construct an algorithm that calculates their ideal weight usi...
asked by 04.10.2016 / 19:54
3
answers

Is it possible to use if else in MySQL queries?

I've been researching the internet and hearing rumors that it's possible to use if else in MySQL queries but have not seen anything concrete about it. Is it really possible? If so, how? I want to make a query in three distinct tables i...
asked by 15.06.2016 / 00:38
1
answer

How to use if-else sets correctly in C?

I'm having a problem with this code in DevC ++, as I see the part of the if-else conditions is perfectly indented and organized (all if has its else and its keys). The error is in the last else , but I do not know how...
asked by 26.10.2018 / 03:57
2
answers

Doubts if else returning 0

I'm trying to do the following exercise:    10) A fruit bowl is selling fruits with the following price list: Até 5 Kg Acima de 5 Kg Morango R$ 2,50 por Kg R$ 2,20 por Kg Maçã R$ 1,80 por Kg R$ 1,50 por Kg       If the cust...
asked by 03.09.2018 / 01:07
1
answer

doubts with if else in java script

I'm using AngularJs and I have this method $scope.login = function (email, usuario, senha) { $http.post("/Login/login", { email: email, usuario: usuario, senha: senha }) .success(function (data) { debugger; if (data ==...
asked by 01.08.2016 / 00:42
2
answers

How to call a method into an If and Else?

I'm developing software for an MVC (Model-view-controller) design video store and the problem is not calling the save () method and the change () method inside the If and Else on the Save button. If the typocadastro variable is "new" it saves an...
asked by 05.11.2015 / 20:23