Logo

Programming-Idioms

History of Idiom 78 > diff from v55 to v56

Edit summary for version 56 by DRodge:
[Java] Automating Google Spreadsheets – Email Reminders

Version 55

2017-04-23, 10:15:51

Version 56

2017-05-12, 23:03:50

Idiom #78 "do while" loop

Execute a block once, then execute it again as long as boolean condition c is true.

Idiom #78 "do while" loop

Execute a block once, then execute it again as long as boolean condition c is true.

Extra Keywords
until
Extra Keywords
until
Code
do {
	someThing();
	someOtherThing();
} while(c);
Code
function checkReminder() {
  // get the spreadsheet object
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  // set the first sheet as active
  SpreadsheetApp.setActiveSheet(spreadsheet.getSheets()[0]);
  // fetch this sheet
  var sheet = spreadsheet.getActiveSheet();
   
  // figure out what the last row is
  var lastRow = sheet.getLastRow();
 
  // the rows are indexed starting at 1, and the first row
  // is the headers, so start with row 2
  var startRow = 2;
 
  // grab column 5 
Comments bubble
The block code is not repeated in the source.
Comments bubble
The block code is not repeated in the source.
Demo URL
https://ideone.com/oRSbiv
Demo URL
https://ideone.com/oRSbiv