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


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2008
    Posts
    7

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

    I read a standard program, and can not understand this sentance

    ABYTE VAR BYTE
    INDEX VAR BYTE

    FOR INDEX=0 TO 7
    ABYTE.0[INDEX]=1 'what the "0" follow ABYTE mean? it is not a arry?
    NEXT INDEX


    ABYTE.0[INDEX], ABYTE[INDEX], ABYTE(INDEX) , they are the same?



    I can not found any information about that, I think it is the way to change every bit of a byte, where is the rule?

    great thanks

  2. #2
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default

    Hi and Welcome

    Take a look at this post it should help.
    https://www.picbasic.co.uk/forum/showthread.php?t=544


    HTH

    Duncan

  3. #3
    Join Date
    Apr 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Default really appreciate your help

    seemed lots of secret skill in PBP not in manual. any document about that mystery?



    really appreciate your help
    Last edited by greatpic; - 10th April 2008 at 08:16.

  4. #4
    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.

  5. #5
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Default The Document about the "Mystery"

    Hi
    seemed lots of secret skill in PBP not in manual. any document about that mystery?
    I do not agree that there is any mystery. Each time I read the manual I understand more clearly something that I had either brushed over or misunderstood. Personally I think the manual is written very well. yes, it is concise yes but remember it is a "reference" manual

    and I do "misunderstanding" really well it's one of the most constant skills I have brought through my whole life.


    If fact... hang on a second......... page 2 section 1.2

    This Manual cannot be a full treatise on the BASIC Language..........
    now I found that quote in a couple of seconds, I doubt I would have been albe to do so in something like Horowitxz for example. Just look at the linear shelf space taken up by manuals in your local high street, manuals explaining manuals referencing the main manual, quick tips, hot tips, concise, complete.........

    The Beauty of PBP is it is stable (for me) and very easy to use, that doesn't mean the code we write with it cannot get horrendously complex.

    Everybody (maybe) gets stuck sometimes, its natural, and thank god there is a place we all can come to get help.

    Your welcome

    Duncan

  6. #6
    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.

  7. #7
    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.

  8. #8
    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

  9. #9
    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