Questions tagged [statements]

In computer programming a statement is the smallest standalone element of an imperative programming language. A program written in such a language is formed by a sequence of one or more statements. A statement will have internal components (e.g., expressions).

A statement is the smallest standalone element of an imperative programming language. A program written in such a language is formed by a sequence of one or more statements. A statement will have internal components (e.g., expressions).

Resources

471 questions
0
votes
1 answer

Refactoring unnested conditional statements

I have a composite component that calls my backing bean. Here I pass the parameters of some image:
Average Joe
  • 643
  • 5
  • 15
0
votes
2 answers

Using an SQL Trigger Statement to move or duplicate all data of a specific tuple into and audit table

create table branch_audit (br_branchno varchar(4), br_branchname varchar(20), br_street varchar(40) not null unique, br_city varchar(20), br_state varchar(2), br_zipcode varchar(5), br_phone varchar(10), …
wattry
  • 936
  • 10
  • 22
0
votes
0 answers

Disabling interval function resulting in visual glitches

I have created a small piece of code that creates a DIV at a random 'fixed' location every 80ms. This div shows up for about 2seconds and then removes itself (including the code generated). However when leaving the part of the page where this is…
Narayan
  • 17
  • 5
0
votes
2 answers

Javascript does ignores my or statement

Hello i have this form i want to validate and now i wrote this nice little javascript/jquery combo but i seem to get stuck on this particular if statement. It where i check the name attribute if it contains "naam". If i fire the click and it does…
Skippengs
  • 60
  • 4
0
votes
0 answers

"PYTHONPATH", going through the list and check elements

i have to set my variable maya_env_variable = "PYTHONPATH" after i have to set a new path new_path_list ['User/Desktop'] i have to get the current value of my PYTHONPATH using os.environ['PYTHONPATH'] current_path_string = os.environ…
user2375723
  • 23
  • 4
  • 7
0
votes
3 answers

Syntax for "or" & "and" statements

what is the proper syntax for putting together and & or statements? I am trying to implement some code to validate the data a user is inputting. I have a segmented control, a text view and a next page button. To advance to the next view…
0
votes
1 answer

Conditional statements in HTML to rule out non-mobile devices

well i've made a responsive website which handles well in mobile devices. Now there are some Phonenumbers on the website which my cliënt would like to be clickable on any Phone so the visitor can call directly. I found that making a link of the…
0
votes
2 answers

Translating MIPS assembly to a C statement

addi $s7, $s7, -4 add $s7, $s7, $s1 lw $s0, 4($s7) Assume integer variables i and j are in registers $s0 and $s1. Assume base address of an integer array X is in register $s7. So far I have this: X = X - 4 X = X + j i = X - 4 + j Is this…
yoshi105
  • 41
  • 2
  • 6
0
votes
1 answer

Multiple prepared statements (SELECT)

I'm trying to change my SQL queries with prepared statements. The idea: I'm getting multiple records out of the database with a while loop and then some additional data from the database in the loop. This is my old SQL code (simplified): $qry =…
Nicolas.
  • 453
  • 1
  • 5
  • 27
0
votes
4 answers

Or statement in C++

I'm another newb coding in c++ for the nds using devkit pro and I couldn't find anything online about this, surprisingly. How do I code an or statement like the following: if ((keys & KEY_L && LR==true) or (keys & KEY_X && LR==false)) { …
Matthew D. Scholefield
  • 2,977
  • 3
  • 31
  • 42
0
votes
2 answers

Anyway to make an else if run a certain number of times?

e.g else if (currentImage == nekoPics[4]) currentImage = nekoPics[5]; Need this to run twice, so my cat animation scratches twice, before moving to else, this is probably the worst way to do this, but im interested if you can have an else if…
Sim
  • 570
  • 1
  • 10
  • 22
0
votes
2 answers

How to do an if statement based on a randomized string in Python?

codes = ["A", "B", "C", "D", "E"] random.shuffle(codes) def print_message(message): print "\n" print "-"*10 print message print "-"*10 print "\n" print_message('This is a test of the %s system' %…
Kryten
  • 595
  • 3
  • 10
  • 25
0
votes
1 answer

Max amount of If Statements?

So i am very new to java. I've been messing around with some if statements using the scanner to test user input. When i run the program, three out of the four if statements work. The fourth runs as the third... I don't know why this is. Here is…
Schmidty15
  • 181
  • 1
  • 2
  • 7
0
votes
3 answers

Java Boolean In 'IF' Statement Not Functioning

Unfortunately the snippet of code below is not functioning as it should. It's attached to a JLabel so that when clicked, notices whether PlayerOne or PlayerTwo is playing, and re-arranges their boolean values accordingly [ex: When mouseClicked:If…
user1543053
  • 25
  • 1
  • 5
0
votes
2 answers

Else block in Python code keeps throwing invalid syntax error...no matter what I do to correct it

I am not an expert Pythonista per se so I will begin with that as a clarification for me asking what could be a considered a trivial question about an else statement issue I have. Anyway for the sake of brevity, I went through all of the else syntax…
MicRoc
  • 117
  • 1
  • 5