Questions tagged [do-loops]

a 'do' loop is a specific type of iteration used to run code repeatedly based on the evaluation of a boolean statement or variable.

do (while) loops in Java: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/while.html

do loops in Fortran: https://en.wikibooks.org/wiki/Fortran/Fortran_control#Loops

do loops in Scheme: https://schemers.org/Documents/Standards/R5RS/HTML/

389 questions
0
votes
0 answers

Loop through PowerPoint deck, insert photos based on hyperlink in slides

I have a powerpoint where each sheet contains the hyperlink to a photo. I would like to insert the image into each slide based on that file path. Is there a VBA program that would accomplish this? Thank you
user7317101
0
votes
1 answer

Cell Value Exact Match In VB.Net Without Looping

So I have been stomped for days on end with trying to find a way around using the .Find function in my application which just needs to find the value typed in the textbox, and either return the value and row on an exact match, or display that the…
DesignerMind
  • 410
  • 4
  • 8
  • 29
0
votes
0 answers

How to loop through multiple value from a text file in Fortran and write those values in a new text file

PROGRAM Lab IMPLICIT NONE ! Declare variables used in the program INTEGER :: openStatus, ioStatus INTEGER :: counter = 0 REAL :: temperature, volume REAL :: sum_temps = 0.0, sum_vols = 0.0 REAL :: max_temp,…
DD1
  • 19
  • 1
  • 9
0
votes
1 answer

Do-loop ignores if-statement

I'm trying to use an if statement in a do loop which is supposed to generate prime numbers. For that I used modulo to sort out the numbers. After it found a prime number I want it to go a step further and add 1 so that the next prime number can be…
traytray
  • 13
  • 4
0
votes
2 answers

SAS Index on Array

I am trying to search for a keyword in a description field (descr) and if it is there define that field as a match (what keyword it matches on is not important). I am having an issue where the do loop is going through all entries of the array and .…
0
votes
1 answer

vbtab issue in a do until loop in vb.net

hey guys i am having a problem in my application with the vbtab can anyone know what is the problem this is my code: txtshowpayments.Text = "Student's ID" & vbTab & "Student's Name" & vbTab & "Total Payment" & vbCrLf Class217FileReader…
Emile Arab
  • 61
  • 10
0
votes
6 answers

How to find the average of double values in an array list using a do loop?

I am creating a method called getAveragePrice and I need it to calculate the average of values in an undefined array list (which would only be defined during the testing/implementation of said method). public double getAveragePrice() { …
Parker Rosen
  • 43
  • 1
  • 8
0
votes
3 answers

SAS first and last obs, time collapsing

I got stuck in one task. Now I have a variable called placement which has two categories, out of home and at home (A and B for short here). A case can be placed at AAABAB sequentially. Each placement has a starting date and ending date, for…
Sophie
  • 1
  • 3
0
votes
1 answer

Subsampling and quantile normalization in R

I need to conduct an analyses where we need to do apply a GBM algorithm onto a series of bootstrapped replicates. Another wrinkle is that each replicate needs to have a quantile normalized outcome. What I am trying to eventually achieve is 1.…
0
votes
1 answer

Move a loop down a column

Is it possible to run a loop and then have it move down 1 column and run again? Basically I liked the loop to run for the values in row 6 and once complete move down to row 7 and run again. I have tried to add a For loop into the macro but I can…
ryan1
  • 1
  • 1
0
votes
1 answer

How to merge a number of loops into one in a VBA program?

I am fairly inexperienced with VBA, and I can't figure out how to make this loop. I set up 4 separate statements and it works this way, but I want to make this one statement. i = 1 Do Until i > combos Range(Cells(i, 10), Cells(i + Defrepeat…
0
votes
1 answer

SAS: keep non-missing values from an array

I have a dataset with date1-date99 and there are at most 5 non-missing dates per observation. I want to only keep the non-missing dates and assign them to datenew1-datenew5. Any suggestions on the best way to to do this. I thought of doing and do…
0
votes
2 answers

infinite Do loop in a body of the method

Could you please help to get my head around why Do statement in the body of the method keeps looping infinitely? I've created a class Guesser. The input is taken from a user as an integer within the main() method and determined answer as an integer…
Vlad
  • 23
  • 5
0
votes
1 answer

How do I read in a consecutive row of a text file in each step of a do-loop in fortran?

I have a dataset of parameter values for 30 species, and I want to run a script that conducts a simulation for each species. The parameter values are currently stored in a .txt file, where each row is a different species, and each column is a…
UCLAEeb
  • 103
  • 1
  • 1
  • 7
0
votes
1 answer

Do loop for creating new variables in SAS

I am trying to run this code data swati; input facility_id$ loan_desc : $50. sys_name :$50.; cards; fac_001 term_loan RM_platform fac_001 business_loan IQ_platform fac_002 business_loan BUSES_termloan fac_002 business_loan RM_platform fac_003…
Swati Kanchan
  • 99
  • 2
  • 15