<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Mark,<br>
For i= 1 to ... will set i to 1 and you will get at least 1 loop.
for-next cannot be written (and why would you) so that you do not get
the loop at least once..<br>
For next is an iteration construct<br>
The other 2 are conditional branching constructs<br>
<br>
So logically for-next is not a test but an iteration control - the
other 2 are branching controls DESIGNED for testing. One when you will
need to loop at least once, and the other in cases when the loop may
not need to not execute at all.<br>
What do we have .......the 4 main programming constructs ...<br>
<ul>
  <li>Sequence .... a series of line of code <br>
  </li>
  <li>Repetition (aka iteration or Loops) - where you would use for
next or whatever the program uses for iterations<br>
  </li>
  <li>Conditional Branching</li>
  <li>Combined Branching and Repetition
    <ul>
      <li>Conditional test at start of the construct - the "while-do" <br>
      </li>
      <li>Conditional test at the end of the construct - the
"repeat-until"<br>
      </li>
    </ul>
  </li>
</ul>
(taken from <a class="moz-txt-link-freetext" href="http://www.tutorials4u.com/c/loopsdecisions.htm">http://www.tutorials4u.com/c/loopsdecisions.htm</a>)<br>
<br>
Mark Kelly wrote:
<blockquote cite="mid471358C2.5050208@mckinnonsc.vic.edu.au" type="cite">Ah,
but FOR..NEXT does test whether the index is beyond the specified
boundaries.
  <br>
  <br>
e.g. FOR i = 1 to 5
  <br>
  <br>
is an implicit pre-test for i&gt;5.
  <br>
  <br>
Cheers
  <br>
Mark
  <br>
  <br>
Kevin Feely wrote:
  <br>
  <blockquote type="cite">Hi All,
    <br>
I would approach the question with - is their a value for which this
loop would NOT execute?
    <br>
If it is a pre test condition then you will not get any processing from
the lines within the loop, if it is a post test condition then the loop
will execute AT LEAST ONCE.
    <br>
Also i (that is me myself I mwa) accept that the logic of a do-while
loop is to test the condition before the loop starts, and the
repeat-until loop tests at the end of the loop (the construct within a
language will vary BUT in generic terms i accept this "standard"), even
though&nbsp; the ACTUAL&nbsp; written algorithm on the question is not perfect (
I suppose thats hard to do unless you write it in 9 diiferent
languages, but then again it is supposed to be in pcode format and
therefore language independent)
    <br>
Also the for-next answer seems to be a bit of a distraction as it does
not TEST for anything, it will simply loop as many times as you want,
via a variable used as a counter,&nbsp; and this could be from 0 times to a
big number.
    <br>
So i would think the expected answer was A
    <br>
regards
    <br>
kev
    <br>
    <br>
    <br>
Sonia Cotugno wrote:
    <br>
    <blockquote type="cite">I agree with you Mark.
      <br>
&nbsp;
      <br>
I answered with (C) For...Next because none of the others tested at the
top of the loop. I think it's actually incorrect to say Do...While. I
really do think it should have said While as an option.
      <br>
&nbsp;
      <br>
Regards,
      <br>
Sonia Cotugno
      <br>
&nbsp;
      <br>
&nbsp;
      <br>
Brighton Grammar School
      <br>
90 Outer Cres
      <br>
Brighton VIC 3186
      <br>
(03) 8591 2200
      <br>
<a class="moz-txt-link-abbreviated" href="http://www.brightongrammar.vic.edu.au">www.brightongrammar.vic.edu.au</a>
<a class="moz-txt-link-rfc2396E" href="http://www.brightongrammar.vic.edu.au">&lt;http://www.brightongrammar.vic.edu.au&gt;</a>
      <br>
&nbsp;
      <br>
&nbsp;
      <br>
      <br>
------------------------------------------------------------------------
      <br>
*From:* <a class="moz-txt-link-abbreviated" href="mailto:sofdev-bounces@edulists.com.au">sofdev-bounces@edulists.com.au</a> on behalf of
<a class="moz-txt-link-abbreviated" href="mailto:sofdev-request@edulists.com.au">sofdev-request@edulists.com.au</a>
      <br>
*Sent:* Fri 10/12/2007 12:00 PM
      <br>
*To:* <a class="moz-txt-link-abbreviated" href="mailto:sofdev@edulists.com.au">sofdev@edulists.com.au</a>
      <br>
*Subject:* sofdev Digest, Vol 32, Issue 8 [Scanned]
      <br>
      <br>
Send sofdev mailing list submissions to
      <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-abbreviated" href="mailto:sofdev@edulists.com.au">sofdev@edulists.com.au</a>
      <br>
      <br>
To subscribe or unsubscribe via the World Wide Web, visit
      <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext" href="http://www.edulists.com.au/mailman/listinfo/sofdev">http://www.edulists.com.au/mailman/listinfo/sofdev</a>
      <br>
or, via email, send a message with subject or body 'help' to
      <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-abbreviated" href="mailto:sofdev-request@edulists.com.au">sofdev-request@edulists.com.au</a>
      <br>
      <br>
You can reach the person managing the list at
      <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-abbreviated" href="mailto:sofdev-owner@edulists.com.au">sofdev-owner@edulists.com.au</a>
      <br>
      <br>
When replying, please edit your Subject line so it is more specific
      <br>
than "Re: Contents of sofdev digest..."
      <br>
      <br>
      <br>
Today's Topics:
      <br>
      <br>
&nbsp;&nbsp; 1. SD VITTA exam 2, multichoice #1 (Mark Kelly)
      <br>
      <br>
      <br>
----------------------------------------------------------------------
      <br>
      <br>
Message: 1
      <br>
Date: Fri, 12 Oct 2007 11:59:09 +1000
      <br>
From: Mark Kelly <a class="moz-txt-link-rfc2396E" href="mailto:kel@mckinnonsc.vic.edu.au">&lt;kel@mckinnonsc.vic.edu.au&gt;</a>
      <br>
Subject: [Year 12 SofDev] SD VITTA exam 2, multichoice #1
      <br>
To: "Year 12 Software Development Teachers' Mailing List"
      <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-rfc2396E" href="mailto:sofdev@edulists.com.au">&lt;sofdev@edulists.com.au&gt;</a>
      <br>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:470ED4ED.3020009@mckinnonsc.vic.edu.au">&lt;470ED4ED.3020009@mckinnonsc.vic.edu.au&gt;</a>
      <br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
      <br>
      <br>
I'm curious what others think...
      <br>
      <br>
"Testing at the 'top of the loop' is performed by which syntax in
      <br>
pseudo-code?
      <br>
      <br>
A. Do..While
      <br>
B. Do..Until
      <br>
C. For..Next
      <br>
D. EOF"
      <br>
      <br>
The suggested answer given is A, with the explanation that 'Do..Until
is
      <br>
often referred to as testing at the bottom of the loop...'
      <br>
      <br>
But surely both do..while and do..until both test at the bottom of the
loop.
      <br>
      <br>
A While..Wend, on the other hand, tests at the top.
      <br>
      <br>
--&nbsp;<br>
      <br>
Mark Kelly
      <br>
Manager - Information Systems
      <br>
McKinnon Secondary College
      <br>
McKinnon Rd McKinnon 3204, Victoria, Australia
      <br>
Direct line / Voicemail: 8520 9085
      <br>
School Phone +613 8520 9000
      <br>
School Fax +613 95789253
      <br>
kel AT mckinnonsc.vic.edu.au
      <br>
      <br>
Webmaster - <a class="moz-txt-link-freetext" href="http://www.mckinnonsc.vic.edu.au">http://www.mckinnonsc.vic.edu.au</a>
<a class="moz-txt-link-rfc2396E" href="http://www.mckinnonsc.vic.edu.au/">&lt;http://www.mckinnonsc.vic.edu.au/&gt;</a>
      <br>
IT Lecture notes: <a class="moz-txt-link-freetext" href="http://vceit.com">http://vceit.com</a> <a class="moz-txt-link-rfc2396E" href="http://vceit.com/">&lt;http://vceit.com/&gt;</a>
      <br>
Moderator: IT Applications Mailing List
      <br>
      <br>
You'll know when we are officially a civilised race: our schools have
      <br>
all the money they need and the Air Force has to run a chook raffle to
      <br>
buy a new bomber.
      <br>
      <br>
      <br>
      <br>
------------------------------
      <br>
      <br>
_______________________________________________
      <br>
sofdev mailing list
      <br>
<a class="moz-txt-link-abbreviated" href="mailto:sofdev@edulists.com.au">sofdev@edulists.com.au</a>
      <br>
<a class="moz-txt-link-freetext" href="http://www.edulists.com.au/mailman/listinfo/sofdev">http://www.edulists.com.au/mailman/listinfo/sofdev</a>
      <br>
      <br>
      <br>
End of sofdev Digest, Vol 32, Issue 8
      <br>
*************************************
      <br>
      <br>
    </blockquote>
    <br>
Important - This email and any attachments may be confidential. If
received in error, please contact us and delete all copies. Before
opening or using attachments check them for viruses and defects.
Regardless of any loss, damage or consequence, whether caused by the
negligence of the sender or not, resulting directly or indirectly from
the use of any attached files our liability is limited to resupplying
any affected attachments. Any representations or opinions expressed are
those of the individual sender, and not necessarily those of the
Department of Education and Early Childhood Development.
    <br>
_______________________________________________
    <br>
<a class="moz-txt-link-freetext" href="http://www.edulists.com.au">http://www.edulists.com.au</a>
    <br>
IT Software Development Mailing List kindly supported by
    <br>
<a class="moz-txt-link-freetext" href="http://www.vcaa.vic.edu.au">http://www.vcaa.vic.edu.au</a> - Victorian Curriculum and Assessment
Authority and
    <br>
<a class="moz-txt-link-freetext" href="http://www.vitta.org.au/vce/studies/infotech/softwaredevel3-4.html">http://www.vitta.org.au/vce/studies/infotech/softwaredevel3-4.html</a>&nbsp; -
VITTA Victorian Information Technology Teachers Association Inc
    <br>
    <br>
    <br>
  </blockquote>
  <br>
</blockquote>
<p></p><p><b>Important - </b>This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.</p></body>
</html>