[Oberon] Compile error - END missing

Duke Normandin dukeofpurl at gmx.com
Thu Apr 8 21:03:55 CEST 2021


On Thu, 8 Apr 2021 20:27:46 +0200
August Karlstrom <fusionfile at gmail.com> wrote:

> On 2021-04-08 19:29, Duke Normandin wrote:
> > 09:PROCEDURE fahr2cels(fahr:REAL):REAL;
> > 10:BEGIN
> > 11:VAR temp:REAL;
> > 12:   temp := .5556*(fahr - 32);
> > 13:   RETURN temp
> > 14:END fahr2cels;
>
> BEGIN should go after the variable declaration.

Thanks! Of course, **that** issue is solved, but brought on a new compiler complaint:

11:    temp := .5556*(fahr - 32);
               ^
    pos   168  err 13  factor starts with incorrect symbol

which I solved when I found this:
real = digit {digit} "." {digit} [ScaleFactor].

fixed:  temp := 0.5556*(fahr - 32);

I'll get rid to the temp variable and simply code:
return 0.5556*(fahr - 32);

I'm porting a C utility I wrote as a learning exercise.

Thanks again!
--
Duke Normandin <dukeofpurl at gmx.com>


More information about the Oberon mailing list