Page 1 of 1

BytesOffset Constant Value

Posted: Sun Sep 28, 2014 6:40 am
by captbill
Hi,
I was have trouble getting ResData.Mod to compile and found it was due to on of the constants not having a value. It was the 'ByteOffset' constant. I guessed with 'ByteOffset = 4;'. Compiles fine now. What is the correct value here though?

Thanks!

Re: ByteOffset Constant Value

Posted: Sun Sep 28, 2014 7:12 am
by captbill
Also to add clarity, I ran across this issue while trying to compile the SunriseSunset demos. I am now unable to compile:

Code: Select all

Oberon for Cortex-M3 Compiler v5.1.0
  compiling SunRiseTest

  Line  Col
    18    8 Error: undefined identifier
    18   19 Error: too many parameters
I am confused though that the error is too many parameters when I look at the SYSTEM.COPY function which suggests too few parameters. I am using the lpc1768 board.

Thanks

Re: ByteOffset Constant Value

Posted: Sun Sep 28, 2014 7:29 am
by cfbsoftware
ResData:

I cannot find any reference to a constant value named ByteOffset in ResData.mod. I can see that a constant value BytesOffset is used and this is correctly declared as a constant = 20.

SunRise / SunSet:

Sorry about the confusion - the example was developed on an earlier version of Astrobe. I have now updated the example on the forum to be compatible with v5.1 or later. The problem was fixed by replacing the call to COPY with Strings.Copy. i.e.

Code: Select all

Strings.Copy(works, out);

Re: ByteOffset Constant Value

Posted: Sun Sep 28, 2014 8:51 am
by captbill
Thank you. Strings.Copy works perfectly.
Don't know how I managed to blank out the constant value. And yes it is 'BytesOffset' and not 'ByteOffset' over here. Pardon the typo.

So all is a go from here. Great demo too!

Thanks again Sir