From: X77 on
Have a Good Morning to all of you.

If someone of you, is so nice,
here I have a little problem.

One professor says that in the loop of kind
do
Statements
while(condition)
the loop is taken (there is the jump to "do")
if condition is false.

I say that there the loop is taken
if the condition is true.

Who is right?
there is an Ipse dixit in informatic? or i can say too what i think

Thank you



From: X77 on
"X77" <a(a)b.c> ha scritto nel messaggio
news:47fd06d2$0$29598$4fafbaef(a)reader1.news.tin.it...
> Have a Good Morning to all of you.
>
> If someone of you, is so nice,
> here I have a little problem.
>
> One professor says that in the loop of kind
> do
> Statements
> while(condition)
> the loop is taken (there is the jump to "do")
> if condition is false.
>
> I say that there the loop is taken
> if the condition is true.
>
> Who is right?
> there is an Ipse dixit in informatic? or i can say too what i think

then the same prof says that i can not use the world "Algoritm"
for explain process in the real world e.g:
take the bus, arrive at home, oper the door, turn on the pc,
connect to internet.


> Thank you
>
>
>




From: Rod Pemberton on
"X77" <a(a)b.c> wrote in message
news:47fd06d2$0$29598$4fafbaef(a)reader1.news.tin.it...
> One professor says that in the loop of kind
> do
> Statements
> while(condition)
> the loop is taken (there is the jump to "do")
> if condition is false.
>
> I say that there the loop is taken
> if the condition is true.
>
> Who is right?
> there is an Ipse dixit in informatic? or i can say too what i think
>
> do
> Statements
> while(condition)

Most languages use "true" as the test state of "condition" in conditionals.
"true" is defined as being "not false". "false" is defined as zero. That
means that "true" is any non-zero value. (The ADA programming language may
be an exception). (I can't guarantee this is always the truth, but it's held
up for almost three decades and over a dozen languages...)

I.e., For a number of high level languages, I'd read the above loop as:

do
Statements
while(condition is "true")

However, I usually expand "true" to this:

do
Statements
while(condition is not zero)

The loop is entered automatically by the code above. The loop exits when
condition is zero ("false"). The loop code repeats when condition is not
zero ("true").

It's possible your prof's expected placement of jumps to implement the loop
could allow a false condition to execute the loop... or perhaps he's
teaching ADA.

HTH,


Rod Pemberton

From: X77 on

"Rod Pemberton" <do_not_have(a)nohavenot.cmm> ha scritto nel messaggio
news:ftj6qs$6g4$1(a)aioe.org...
> "X77" <a(a)b.c> wrote in message
> news:47fd06d2$0$29598$4fafbaef(a)reader1.news.tin.it...
>> One professor says that in the loop of kind
>> do
>> Statements
>> while(condition)
>> the loop is taken (there is the jump to "do")
>> if condition is false.
>>
>> I say that there the loop is taken
>> if the condition is true.
>>
>> Who is right?
>> there is an Ipse dixit in informatic? or i can say too what i think

> It's possible your prof's expected placement of jumps to implement the
> loop
> could allow a false condition to execute the loop... or perhaps he's
> teaching ADA.

it will be good; i like all the programming language;
no the professor don't teaching ADA
nor C nor Pascal it seems only a formal wrong language

> HTH,
>
>
> Rod Pemberton



From: X77 on

"X77" <a(a)b.c> ha scritto nel messaggio
news:47fd2832$0$40216$4fafbaef(a)reader5.news.tin.it...
>
> "Rod Pemberton" <do_not_have(a)nohavenot.cmm> ha scritto nel messaggio
> news:ftj6qs$6g4$1(a)aioe.org...
>> "X77" <a(a)b.c> wrote in message
>> news:47fd06d2$0$29598$4fafbaef(a)reader1.news.tin.it...
>>> One professor says that in the loop of kind
>>> do
>>> Statements
>>> while(condition)
>>> the loop is taken (there is the jump to "do")
>>> if condition is false.
>>>
>>> I say that there the loop is taken
>>> if the condition is true.
>>>
>>> Who is right?
>>> there is an Ipse dixit in informatic? or i can say too what i think
>
>> It's possible your prof's expected placement of jumps to implement the
>> loop
>> could allow a false condition to execute the loop... or perhaps he's
>> teaching ADA.
>
> it will be good; i like all the programming language;
> no the professor don't teaching ADA
> nor C nor Pascal it seems only a formal wrong language

if you have to assign a vote for my english or for how i write
from 1 to 10; it will be ...

>> HTH,
>>
>>
>> Rod Pemberton
>