Possible bugs?


Closed Thread
Results 1 to 7 of 7

Thread: Possible bugs?

  1. #1
    mylittlepony's Avatar
    mylittlepony Guest

    Default Possible bugs?

    Hi everyone,

    This is the second time I've tried to post this message so please forgive me if I'm a little brief.

    My first problem is with using arrays of word variables. I am unable to pass a word from one array into another, I must use an intermediate variable for it to work i.e.

    Dim ArrayA[5] as Word
    Dim ArrayB[5] as Word

    ArrayB[1]=ArrayA[1]

    Returns funny values so I have to do the following:

    Dim ArrayA[5] as Word
    Dim ArrayB[5] as Word
    Dim Tempword as Word

    Tempword = ArrayA[1]
    ArrayB[1] = Tempword


    My second problem is with evaluating Bits in a conditional IF/THEN statement:-


    Dim Flag as Bit

    Flag = 1

    If Flag = 1 then goto dosomething

    In the above example dosomething is never executed as If Flag = 1 is ALWAYS evaluated as false. The following variation will not work either:

    Dim Flag as Byte

    Flag.0 = 1

    If Flag.0 = 1 then goto dosomething

    The only way I can get a conditional IF/THEN to work on a bit is to load it into a Byte first and evaluate the whole Byte:

    Dim Flag as Bit
    Dim Temp as Byte

    Flag = 1
    Temp=Flag

    If Temp = 1 then goto dosomething

    The above works fine. These statements used to work before I upgraded so they must be bugs in the compliler?? There must be others of you out there that have come across this? After all its pretty fundamental stuff.

    Any suggestions, comments or news of bugfixes/upgrades would be gratefully recieved.

    atb

    Dave Housley

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    A number of questions arise here...

    Firstly, what version of PBP are you using?

    Secondly, you are using DIM to define your variables, which is a little alien, leading me to suspect that perhaps we are not talking about the same compiler or you are on the wrong forum...

    Dim ArrayA[5] as Word

    is done in PBP as

    ArrayA var word [5]

    Thirdly, assignments such as...

    ArrayA(1)=ArrayB(1) work just fine, as do all the conditional IF statements with bits, bytes and words and also with subsets of them like "If byteA.0=1 then..." so again I query if you're perhaps on the wrong forum.

    Melanie

  3. #3
    mylittlepony's Avatar
    mylittlepony Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Melanie,

    I think I might be on the wrong site!!!!

    OOOOPS

    I'm using the Proton+ Compiler from Crownhill Basic.

    I've posted the same message on the correct site now.

    Apologies

    Dave

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Shining example of why some folks stick with PBP...

  5. #5
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default

    Hardly!

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    That was kinda tongue-in-cheek of me (not intended as a dig Lester)... I'm quite sure the Proton+ has now come of age, however all things aside, (and ignoring the limitations of PBP), I have confidence in the product in as far as I know it's not going to spring any unpleasant surprises on me.

    Since the average lead-time-to-market is now down to just over three weeks and the amount of time allocated from client concept to finished design averages about four days, the reliance on mature, stable and secure software is of absolute and prime importance - more so even than nice features like floating point.

    Melanie

  7. #7
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default

    I guess if you ignore all of the limitations of PBP, its great!

    Mature, stable, secure !!??

    Time will tell ;-)

    but here is not the place.

Similar Threads

  1. calculator-like code entry with matrix keypad and display
    By Dennis in forum mel PIC BASIC Pro
    Replies: 35
    Last Post: - 16th December 2009, 22:58
  2. Replies: 14
    Last Post: - 26th September 2007, 05:41
  3. destroying my last pic? driving a miniature motor
    By Michael Wakileh in forum Schematics
    Replies: 20
    Last Post: - 28th August 2007, 09:38
  4. Heated Debate... Features and Updates and Things...
    By OXIMBIT in forum PBP Wish List
    Replies: 39
    Last Post: - 3rd July 2005, 08:10

Members who have read this thread : 1

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