Closed alexpseletr closed 6 years ago
PicPas use the syntax of Modula-2 no standard Pascal . To declare functions, you use the same word PROCEDURE. So you declare a function:
procedure adc_read(adc_chan:byte):word;
begin
end;
your solution worked only as a suggestion the project (http://www.pas2pic.hu/) that works only at command prompt accepts the expression function
It's not a problem to implement the FUNCTION keyword. It's just PicPas bet on a modern Pascal syntax. The same is true for structures like IF, WHILE and FOR. There is "Pascal mode" in PicPas that will accept the classic Pascal syntax.
function adc_read(adc_chan:byte):word; begin end;
error : ":" or ", " expected.