This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Sunday, September 30, 2007

[oopic] Re: Multiple while conditions

Might be easier to break it into component parts...

If A < 100 Then Z = 1
...
...
If B <> 250 Then Y = 1
...
...
If C = 50 Then X = 1
...
...
If X = 1 Or Y = 1 Or Z = 1 Then ...
etc.

or something along those lines.
I haven't tried any of these, but the idea of breaking up the logic
into its component pieces is a sound one... right?
It will take more programming lines, and maybe a few more variable
bytes (for X, Y, and Z placeholders) but surely something like this
will work. (I hope.) I'm also sure one of the more experienced
programmers out there can suggest a more elegant way of doing the
same thing, but I tend towards the brute force method - clumsy,
inelegant, but in the end workable.
BTW, have you tried it yet? Ya never know... ;)

--- In oopic@yahoogroups.com, "jim_three_uk" <jimthree@...> wrote:
>
> Hi,
>
> Is it possible to have a While loop execute until a number of
> conditions are true? I can't find reference to it in the manual.
>
> While A < 100 and B == 250 and c != 50
> <statements>
> Wend
>
> Thanks.
>
> Jim
>



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments: