Page 1 of 1

Problem with importing RIC file.

Posted: 19 Feb 2012, 14:59
by schodet
I have a problem when trying to #import Swearing.ric from the standard firmware to an array. Here is the code:

Code: Select all

#import "Swearing.ric" ric

task main ()    
{       
    GraphicArrayOut(0, 0, ric);
    while (!ButtonCount (BTNCENTER, true))
        ;
}
If I compile with "nbc -EF -L=ricbug.lst ricbug.nxc" (version svn606), I can see a strange byte in the listing:

Code: Select all

ric     byte[]  0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3A, 0x0, 0x30, 0x0, 0x188, <--- 0x188 > 0xff !

Re: Problem with importing RIC file.

Posted: 19 Feb 2012, 18:17
by spillerrec
It should have been two bytes, 0x88 and 0x01. This correspond to the value 0x0188.
I'm not seeing this behavior in 3.3.8.10 13-12-2011 or 3.3.8.10 05-02-2012 though, when compiling in BCC it specifies it as two separate bytes in both versions. And it behaves as intended on the NXT too.

Re: Problem with importing RIC file.

Posted: 19 Feb 2012, 20:07
by afanofosc
It is possible that this is a bug in the FreePascal build that does not exist in the Delphi build. The Windows builds are all created using Delphi but Mac OSX and Linux are created using FreePascal. It also could depend on the version of FreePascal that you use to build the compiler.

Can you comment on which platform you are using (iirc Linux) and what version of the FreePascal compiler you have installed?

John Hansen

Re: Problem with importing RIC file.

Posted: 02 Apr 2012, 18:58
by schodet
afanofosc wrote:It is possible that this is a bug in the FreePascal build that does not exist in the Delphi build. The Windows builds are all created using Delphi but Mac OSX and Linux are created using FreePascal. It also could depend on the version of FreePascal that you use to build the compiler.
Can you comment on which platform you are using (iirc Linux) and what version of the FreePascal compiler you have installed?
I use Slavko debian packages, I think this is 2.4.0.

Sorry for the late response.