Program too long?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Thanks Charles.

    It was this line causing the problem:

    Code:
    IF (temp>=$32 AND temp<=$47) OR (temp>=$3A AND temp<=$40) OR (temp>=$5B AND temp<=$60) OR (temp>=$7B AND temp<=$7E) OR (t2b_word_length+index=t2b_focus_length) THEN
    I'll expand it out into a number of IF statements and that'll fix it.

    Cheers
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    IF (temp>=$32 AND temp<=$47) OR (temp>=$3A AND temp<=$40) OR (temp>=$5B AND temp<=$60) OR (temp>=$7B AND temp<=$7E) OR (t2b_word_length+index=t2b_focus_length) THEN
    IF (temp>=$32 AND temp<=$47) OR (temp>=$5B AND temp<=$60) OR (temp>=$7B AND temp<=$7E) OR (t2b_word_length+index=t2b_focus_length) THEN[/QUOTE]

    You can get rid of one of the temp-AND cases in the >$32 and <$47...first couple of ANDs
    Might save just that one AND/OR temp variable right there...

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    thanks skimask, cos u actually pointed out a bug in my code there. the first set should have been $20 to $2F... i accidentally put the decimal numbers in instead of hex.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    thanks Kamikaze47, cos u actually pointed out a bug in my code there.

    Should have been ...
    Code:
            ifdef T8
                ifndef NO_T7_WARNING
                    messg "Temp variables exceeding T7"
                endif
            endif
    Then it would display a relevant "Warning", instead of obscure errors.
    <br>
    DT

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  3. Replies: 1
    Last Post: - 23rd May 2009, 09:22
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 14:30

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