Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
OK this program about a solar tracker with pic16f876 when i compiled the program in micro pascal compiler
i see this errors
Program programme;
Var l,i:longint;
Label L1;
begin
trisb:=$FC;
trisc:=$FF;
trisa:=$FF;
ADCON1:=$8E;
portb:=0;
while (true) do
begin
L1:
i:=0;
portb:=0;delay_ms(5000);
l:=adc_read(0);delay_ms(10);
while ((l<512)and (portc.0=0)) do
begin
portb.0:=1;
l:=adc_read(0);delay_ms(100);
i:=i+1;
if i=50 then goto L1;
end;
portb:=0;
while ((l>512)and (portc.1=0)) do
begin
portb.1:=1;
l:=adc_read(0);delay_ms(100);
end;
end;
end.
the errors is
1 301 "%"is not valid identifier %ùù.mpas
1 304 Syntax error: Expected ";" but "ù" found %ùù.mpas
0 102 Finished (with errors): 07 ÌæÇä 2011, 13:23:42 %ùù.mpppi
4 304 Syntax error: Expected "." but "Program" found mmm.mpas
0 102 Finished (with errors): 07 ÌæÇä 2011, 13:23:47 mmm.mpppi
this is errors please Help me to find the solution i need it as soon as possible to simulate it in Proteus and realize it
Posted
Comments
Manfred Rudolf Bihy 7-Jun-11 11:45am    
Add proper tagging to your code.

1 solution

You're not reporting properly. You're showing compile-time errors (you need to mention that). What is "1 304"? Is that column/line numbers? You don't show the code lines with the errors. You need to show them and add comments where the errors are.

Now, your problem is non-ASCII characters in identifiers which are not valid Pascal identifiers. Again, it indicates that you didn't show relevant code: in the sample you show there are not such identifiers.

Do the following:

Makes sure you use ASCII characters only. First, make sure when you edit file, you safe in ANSI, not in any of the Unicode UTFs. The file should be without any Unicode BOM marker and uses ANSI encoding. For example, in Notepad's "Save As" there are four encodings, one of them is ANSI.

Further, make sure you do not use anything except valid characters in identifiers. The valid characters are A to Z or a to z. For this purpose, I would suggest you program only in English, even comments. Even you're more comfortable with a difference culture and you language allows non-English characters, writing programs in English only saves you from many troubles in future. In particular, it improves your chances to get a solution at CodeProject. :-)

Good luck,
—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900