plaese help explain such statement ABYTE.0[Index]=0, what is that mean


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    While not offering any detail, the Repeat statement in the manual does demonstrate it.

  2. #2
    Join Date
    Apr 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Smile you are so kind

    Quote Originally Posted by dhouston View Post
    While not offering any detail, the Repeat statement in the manual does demonstrate it.
    I have the pbp manual , different version with you? I can not found the statment "repeat", while I found the word in it : )
    1.2. About This Manual
    This manual cannot be a full treatise on the BASIC language. It
    describes the PicBasic Pro Compiler instruction set and provides
    examples on how to use it.

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


    Did you find this post helpful? Yes | No

    Default

    I have an ol' version of the manual.. for compiler version 2.47 (date 9/05). REPEAT is located in section 5.66

    But yeah... it show they use it... but they don't explain anything

    Online version show date 3/04, Repeat is still at 5.66, same... everything.

    I didn't check the whole manual.. but here's my understand.. i'll do it once

    It's nothing more than another kind of fussy writing thing. Which perform some kind of text substitution thingy.

    YourVar=4
    Something.0[YourVar]=1

    becomes Something.04=1

    That's the easiest way i see to explain it... but yeah.... why it's like that? ... because
    Last edited by mister_e; - 11th April 2008 at 10:04.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    I'm not sure why they didn't just allow you do use VAR.BIT=0 instead of VAR.0[BIT]=0.

    What would be nice is to be able to also do this: VAR[INDEX].BIT=0

    I came across a situation just yesterday that required me to set a bit in a word, in an array to the same as another bit in another word in another array, so if it was allowed would be like this:

    VAR1[INDEX].BIT=VAR2[INDEX].BIT

    Instead of one line like above, it ended up being 5 lines.

    No matter tho, theres always a way around these things.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  5. #5
    Join Date
    Apr 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Default you are all so kind

    you are all so kind

Similar Threads

  1. 16F883 and Problems with HIGH statement
    By aaanekre in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th October 2009, 01:09
  2. END Statement
    By jderson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th November 2008, 14:48
  3. using AND as an IF statement
    By dw_pic in forum mel PIC BASIC
    Replies: 27
    Last Post: - 8th June 2006, 18:05
  4. getting around the basic IF - THEN statement
    By dw_pic in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th February 2006, 14:10

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