​ ​ ​ ​ Using AND & OR in Blockly
Results 1 to 4 of 4

Thread: Using AND & OR in Blockly

  1. #1
    New Member
    Join Date
    Jun 2011
    Location
    Bournemouth
    Posts
    8

    Question Using AND & OR in Blockly

    Is there a simple way to use AND or OR in Blockly. I am trying find a simple way using Blockly of writing:
    If A>10 AND B>10 THEN (such as starting the motors and making them go forward)

    I appreciate that I could do it in Basic and add it into the program but I am trying to show Blockly to some young Students and want to keep the programming within Blockly if I can at this stage.
    Thanks, Bill

  2. #2
    Technical Support
    Join Date
    Jan 1970
    Location
    Bath,UK
    Posts
    6,404
    Blog Entries
    1

    Default

    You can add and/or options to an if like this

    CaptureAndOr.PNG
    Last edited by Technical; 09-01-2017 at 22:51. Reason: reinserted image
    PICAXE Technical Support

  3. #3
    New Member
    Join Date
    Jun 2011
    Location
    Bournemouth
    Posts
    8

    Default

    Thanks for your answer but unfortunately, the link does not open. It just takes me to a page telling me the link is invalid.
    Could you send it as a PDF or a JPEG.
    Thanks, Bill

  4. #4
    Senior Member
    Join Date
    Apr 2011
    Location
    Spain
    Posts
    147

    Default

    This is a small shortage in Blockly I think.
    You must use two if-then blocks.
    Here BASIC is easier.

Bookmarks

Posting Permissions

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