Recent

Author Topic: [SOLVED] GO32V2 DOS target - illegal unit name  (Read 850 times)

MemAvail

  • Newbie
  • Posts: 4
[SOLVED] GO32V2 DOS target - illegal unit name
« on: April 25, 2024, 08:43:53 pm »
Hi, anyone familiar with such error? (attachment)
Quote
"Illegal unit name (expecting PROGRAM)"
Code: Pascal  [Select][+][-]
  1. {$OUTPUT_FORMAT COFF}
  2. unit DosObj;
  3.  
  4. interface
  5.     function PRAND(Min, Max: Integer) : Integer; Public name 'PRAND';
  6. implementation
  7.     function PRAND(Min, Max: Integer) : Integer; Public name 'PRAND';
  8.     var
  9.         Result : Integer;
  10.     begin
  11.         Randomize;
  12.         Result := Random(Max - Min) + Min;
  13.         WriteLn('PRAND ', Result);
  14.         PRAND := Result;
  15.     end;
  16. end.
  17.  

Quote
FP IDE 1.0.12 [2021/05/26]
Compiler 3.2.2
« Last Edit: April 25, 2024, 09:33:32 pm by MemAvail »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11605
  • FPC developer.
Re: GO32V2 DOS target - illegal unit name
« Reply #1 on: April 25, 2024, 08:47:47 pm »
I guess it means that filename must match unit/program name.

MemAvail

  • Newbie
  • Posts: 4
Re: [SOLVED] GO32V2 DOS target - illegal unit name
« Reply #2 on: April 25, 2024, 09:34:08 pm »
I guess it means that filename must match unit/program name.
Thanks, it helped !

 

TinyPortal © 2005-2018