How many AND / OR are accepted ?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326

    Default How many AND / OR are accepted ?

    good day ,
    I have a very simple qestion regarding the number of AND and OR can be put in the " if " control under PicbasicPro.
    Eg.: if (a>b) AND (c>d ) AND (e>f) AND (g>h) AND (i>l ) AND ( m>n) AND (o>p) THEN ....
    How many AND / OR are accepted ?
    Thanks
    Ambro

  2. #2
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: How many AND / OR are accepted ?

    I think that the number of Logic are limited by the two line space!

    But you can do the and Logic with nested if/then like this:

    If a>B then
    If c>d then
    If e>F then
    .
    .
    If x>z then

    Code for the Action necessary If all the ands are satisfied

    ENDIF
    .
    .
    ENDIF
    ENDIF
    ENDIF

    This type of construct is shorter in terms of ram usage and is much faster than the corresponding "line construct"
    With the same approch you can make the OR construct.

    Naturaly here the limitation is the ram size of your mcu.

    Cheers
    Al.
    All progress began with an idea

  3. #3
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: How many AND / OR are accepted ?

    Thanks for the clarification,
    All the best.
    Ambro

Similar Threads

  1. Brown-out symbol not accepted.
    By thronborg in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 30th August 2013, 04:30
  2. 12F675: DEC modifier not accepted
    By jswayze in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st September 2005, 03:39

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts