suggest optimize code


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    okay i'm going to tray it, and the next idea is:


    Code:
    testmesage=1
    FOR I=0 to 3  
        if poruka[i+1]<>klima[i+1] then testmesage=0
    next i
    
    if testmesage=1 then gosub saljisms
    poruka[0] is a blank space, so i don't need it, and i'm gona define klima as array and give it a shot!


    .......and i almost forgot!!! thx ioannis
    Last edited by xxxxxx; - 19th March 2009 at 14:41.

  2. #2
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    and next question if i put klima in eeprom using DATA command how can i call it in my program to qompare it with some other variable's?

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Why not compare array to EEPROM?

    Ioannis

  4. #4
    Join Date
    Mar 2009
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Code:
    testmesage=1
    FOR I=0 to 3  
        if poruka[i+1]<>klima[i+1] then testmesage=0
    next i
    
    if testmesage=1 then gosub saljisms
    this one works fine and compiles less....

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Not surprised :-)

    Ioannis

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

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