473,473 Members | 1,826 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

while-loop?

Hi,

Being a newbie with Python, I'm trying a short program with this:
<..>
t = RoboInterface()
<..>
while not t.Digital(1): # while endpoint is not reached
15 pass
However, it always hangs on the 'while', which I can't find in the
tutorial at http://www.python.org/doc/. Assuming 'while' should work,
what's wrong with the code?

Thanks.
Jun 27 '08 #1
1 902
On Wed, 28 May 2008 19:56:55 +0200, huub wrote:
Being a newbie with Python, I'm trying a short program with this:
<..>
t = RoboInterface()
<..>
while not t.Digital(1): # while endpoint is not reached
15 pass

However, it always hangs on the 'while', which I can't find in the
tutorial at http://www.python.org/doc/. Assuming 'while' should work,
what's wrong with the code?
Obviously the condition is alway true. Maybe you have to do something
within the loop so it eventually will be false at some point!?

Ciao,
Marc 'BlackJack' Rintsch
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: James E Koehler | last post by:
I can't get the WHILE statement to work in MySQL. The version of MySQL that I am using is: Ver 12.16 Distrib 4.0.6-gamma, for Win95/Win98 (i32) running on Windows MX. Here is the relevant...
27
by: Yan | last post by:
A lot of times when reading open software, i come across macros that are defined as follows: #define CALL_FUNCS(x) \ do { \ func1(x); \ func2(x); \ func3(x); \ } while (0);
36
by: invni | last post by:
I have a nested while. How do I go from the inner while to the beginning of the outer while? Can this be done without using goto? while_1() { some codes here while_2() { if true go to the...
147
by: Michael B Allen | last post by:
Should there be any preference between the following logically equivalent statements? while (1) { vs. for ( ;; ) { I suspect the answer is "no" but I'd like to know what the consensus is
12
by: Howard | last post by:
Hello everyone (total VB.NET beginner here), I'm reading the "SAMS Teach Yourself VB.NET In 21 Days" book, and came across an exercise that I can't get to work. The exercise asks that you create...
2
by: Carl Cerecke | last post by:
Well, it doesn't quite rule them all, but it is fast: About three times faster than using one function per state. Faster than using generators. Faster than using code objects. Some, possibly...
14
by: Aleramo | last post by:
I don't understand the reason cos this cycle: do { printf ("\nCome devono essere posizionati gli elementi?\n") ; printf ("* premere E, nel caso di posizionamento sul piano E\n") ; printf...
4
by: Gary | last post by:
Hi, I get this error " " when my web page run, what does it mean? Hope someone can help!!! Gary
8
by: voger | last post by:
Hi everyone Can anyone please explain this strange behavior? I have this function that is supposed to copy the contents of one array to one other array, but sorted. I don't know if the logic...
2
by: kya2 | last post by:
I am not able to create following store procedure. CREATE PROCEDURE DBSAMBA.InsertDeleteBatch(OUT norows INT ) RESULT SETS 1 LANGUAGE SQL BEGIN part1 DECLARE TOTAL_LEFT INT DEFAULT 0; ...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.