PDA

View Full Version : Possible bugs?



mylittlepony
- 22nd September 2003, 09:00
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

Melanie
- 22nd September 2003, 12:08
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

mylittlepony
- 22nd September 2003, 12:44
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

Melanie
- 22nd September 2003, 17:53
Shining example of why some folks stick with PBP...

lester
- 22nd September 2003, 18:20
Hardly!

Melanie
- 22nd September 2003, 23:20
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

lester
- 23rd September 2003, 05:35
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.