The Best Solution


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    for temp = 0 to 7
    if (ML_Value[temp] <= $5A) or (ML_Value[temp] => $82) then Summe_Alarm.temp = 1
    if (ML_Value[temp] > $5A) and (ML_Value[temp] < $82) then Summe_Alarm.temp = 0
    next temp

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Yup but this should return a syntax or modifier error. Summe_alarm.0[temp]=x should cure the problem
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    Summe_alarm.0[temp]=x
    DOH! I just woke up, that's my excuse and I'm sticking to it.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Thank you for the very good solution !
    Another Question :-)
    Why I need Zero for : Summe_Alarm.0[Temp] and why not just
    Summe_Alarm.[Temp] ?
    I know that I receive a syntax but I dont understand what is the reason for use Zero !

    Regard Pesti
    Last edited by Pesticida; - 26th May 2007 at 21:00.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    kind of fussy writing stuff i guess.

    further reference:
    http://www.picbasic.co.uk/forum/showthread.php?t=544
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Thank you Mister.

    Regard Pesti

  7. #7
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Post

    I think your original code would work marginally faster. However, it would also consume much more code space. So that's the compromise I guess. Out of interest, (DO's & Whiles) are significantly much faster than (For Nexts) in Visual Basic.

Similar Threads

  1. Strange I2C problem (and solution)
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th December 2008, 19:14
  2. Replies: 6
    Last Post: - 20th September 2008, 12:28
  3. Replies: 7
    Last Post: - 7th February 2008, 09:46
  4. Need PC software solution
    By mister_e in forum Off Topic
    Replies: 9
    Last Post: - 27th November 2005, 02:18
  5. Battery Solution
    By Keith in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd July 2005, 06:07

Members who have read this thread : 0

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