gnupic: Help! How do i 'include' a module in GPAL?
Subject:
Re: Help! How do i 'include' a module in GPAL?
From:
Craig Franklin ####@####.####
Date:
24 Oct 2004 17:48:19 +0100
Message-Id: <417B96CC.7000906@users.sourceforge.net>
David McNab wrote:
> Hi,
>
> How do I import another module into a GPAL module?
>
> For instance, the following 'hello world' program:
>
> module helloleds is
>
> pragma processor = "16f873a";
>
with p16f873a;
> procedure main is
> begin
> p16f873a.TRISB = 0x00;
> p16f873a.PORTB = 0xa5;
> end procedure;
>
> end module;
>
> I've spent a couple of frustrating hours trying to figure out how to
> get this thing to compile.
gpal p16f873a.pub helloleds.pal
> No mention in the docs of how to import needed modules and access
> their namespaces.
>
From the manual:
2.6.11 With
with <name>;
The with statement tells the compiler to add the data
from the public <name> to its symbol tables. This will
allow access to that module's subprograms and data.
I am committing big changes to gpal now. If you have any
recommendations I am listening.
> Please help
>