The following does not compile
I get the error 'Array of type BYTE expected' in the second to bottom line. But cTest is an array of type byte. I get the same error for memory (structconst) variables too.
Code
program Bug;
{$NOSHADOW}
{ $WG} {global Warnings off}
Device = mega128, VCC=5;
{ $BOOTRST $0F000} {Reset Jump to $0F000}
Define_Fuses
// Override_Fuses;
NoteBook = B;
COMport = USB;
LockBits0 = [];
FuseBits0 = [];
FuseBits1 = [SPIEN, OCDEN];
FuseBits2 = [];
Import SysTick, LCDport;
From System Import Float;
Define
ProcClock = 4608000; {Hertz}
SysTick = 10; {msec}
StackSize = $0064, iData;
FrameSize = $0064, iData;
LCDport = PortA;
LCDtype = 44780;
LCDrows = 2; {rows}
LCDcolumns = 40; {columns per line}
Implementation
{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
type
{--------------------------------------------------------------}
{ Const Declarations }
const
cTest : array[0..7] of byte = ( %01010,
%01010,
%01010,
%01010,
%01010,
%01010,
%01010,
%01010);
{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
var
{--------------------------------------------------------------}
{ functions }
{--------------------------------------------------------------}
{ Main Program }
{$IDATA}
procedure RegisterSpecialChar( pChar: array[0..7] of byte );
begin
LCDCharSet( #7, pChar[ 0 ],
pChar[ 1 ],
pChar[ 2 ],
pChar[ 3 ],
pChar[ 4 ],
pChar[ 5 ],
pChar[ 6 ],
pChar[ 7 ] );
end;
begin
RegisterSpecialChar( cTest );
end Bug.
{$NOSHADOW}
{ $WG} {global Warnings off}
Device = mega128, VCC=5;
{ $BOOTRST $0F000} {Reset Jump to $0F000}
Define_Fuses
// Override_Fuses;
NoteBook = B;
COMport = USB;
LockBits0 = [];
FuseBits0 = [];
FuseBits1 = [SPIEN, OCDEN];
FuseBits2 = [];
Import SysTick, LCDport;
From System Import Float;
Define
ProcClock = 4608000; {Hertz}
SysTick = 10; {msec}
StackSize = $0064, iData;
FrameSize = $0064, iData;
LCDport = PortA;
LCDtype = 44780;
LCDrows = 2; {rows}
LCDcolumns = 40; {columns per line}
Implementation
{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
type
{--------------------------------------------------------------}
{ Const Declarations }
const
cTest : array[0..7] of byte = ( %01010,
%01010,
%01010,
%01010,
%01010,
%01010,
%01010,
%01010);
{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
var
{--------------------------------------------------------------}
{ functions }
{--------------------------------------------------------------}
{ Main Program }
{$IDATA}
procedure RegisterSpecialChar( pChar: array[0..7] of byte );
begin
LCDCharSet( #7, pChar[ 0 ],
pChar[ 1 ],
pChar[ 2 ],
pChar[ 3 ],
pChar[ 4 ],
pChar[ 5 ],
pChar[ 6 ],
pChar[ 7 ] );
end;
begin
RegisterSpecialChar( cTest );
end Bug.
I get the error 'Array of type BYTE expected' in the second to bottom line. But cTest is an array of type byte. I get the same error for memory (structconst) variables too.