With reference to my old thread http://www.mikroe.com/forum/viewtopic.php?t=12315
This program is still not working & had not been responded since Nov 2007.
So I am putting it up here again, to see if there is any solution.
Or has this been an oversight in the redevelopment or a bug.
This short program will not compile
Code: Select all
program DAY;
{ MCU : ATmega16
Oscillator : 10 MHz, External
SW : mikroPascal PRO for AVR }
var
DOW : String[3];
Temp : Byte;
const
Day_Of_Week : array[1..7] of String[3] = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
{ M A I N P R O G R A M }
begin
Temp := 0;
for Temp := 1 to 7 do
begin
DOW := Day_Of_Week[Temp];
end;
end.
Assigning the array of string as part of const is fine.0 1 mPAVR.exe -DBG -pATMEGA16 -MSF -O11111114 -fo10 -N"C:\Program Files\Mikroelektronika\mikroPascal PRO for AVR\Tryout\WD\DAY.mppav" -SP"C:\Program Files\Mikroelektronika\mikroPascal PRO for AVR\Defs\" -SP"C:\Program Files\Mikroelektronika\mikroPascal PRO for AVR\Uses\LTE64KW\" -SP"C:\Program Files\Mikroelektronika\mikroPascal PRO for AVR\Tryout\WD\" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl" "DAY.mpas"
0 132 Compilation Started C:\PROGRAM FILES\MIKROELEKTRONIKA\MIKROPASCAL PRO FOR AVR\TRYOUT\WD\DAY.mpas
11 304 Syntax error: Expected ";" but "=" found DAY.mpas
11 304 Syntax error: Expected "." but "(" found DAY.mpas
0 102 Finished (with errors): 11 Dec 2008, 09:38:23 DAY.mppav
But when it hit the line 'DOW := Day_Of_Week[Temp]', it complained.
Basically I have given up in this area, as I feel this is pretty crucial to any user who want to assign array for repetition work instead of repeating strings table for controlling LCD display.
Maybe I should asked the question other way round.
Does this compiler handle this operation ?
if yes
then it must be a bug
else
if no
add this function (string array handling) for the next version.
Ken