On Thu, 22 Feb 2018 12:48:21 +0100 (CET) Michael Van Canneyt <mich...@freepascal.org> wrote:
>[...] > First of all, normally it won't work either way, because you must use "unit > foo;" and "unit bar;" in the files. No, I can use normal units. This works here: ---test1.pas--- uses foo in 'unit1.pas', unit1, bar in 'sub/unit1.pas'; Begin i:=3; // from unit1.pas foo.i:=foo.i+1; // from unit1.pas bar.j:=27; // from sub/unit1.pas writeln(foo.i,' ',unit1.i,' ',bar.j); end. --- ---unit1.pas--- unit unit1; interface uses foo in 'sub/unit1.pas'; // unit1 uses another unit1 var i: integer; implementation end. --- ---sub/unit1.pas--- unit unit1; interface var j: integer; implementation end. --- Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal