[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Novice Questions
From: |
Valeriy E. Ushakov |
Subject: |
Re: Novice Questions |
Date: |
Thu, 15 Apr 1999 04:16:35 +0400 |
On Wed, Apr 14, 1999 at 08:29:10PM +0400, Colin Klipsch wrote:
> I must be missing some simplification, but my trials with "extend"
> and "export" haven't worked. Is there a way to define a whole
> batch of symbols, all commonly dependent on the same package, but
> without qualifying each definition individually?
Package your definitions, import necessary stuff, export your stuff
and @Use the package. E.g.
import @BasicSetup
export @Para @SeePage
def @MyUtils
@Begin
macro @Para { @PP }
def @SeePage right x { see address@hidden x} }
@End @MyUtils
@Use { @MyUtils }
> And just as a general issue, Lout's scoping model is still unclear
> to me. Is there such a thing as a "global" or "document-wide"
> namespace? If not, how are symbols scoped? Can I define global
> functions as well as functions local to a chapter or section?
Lout uses traditional static (lexical) scoping. Modula-2 pops to mind
(as it has nested functions and modules), but unlike Modula-2 you can
import/export from any scope, there's no distinct concept of module.
Check list archives at http://www.ptc.spbu.ru/~uwe/lout/list.html
I posted a short example that demonstrates some scoping rules (search
for a message `Re: Changing parameters midstream').
HTH.
SY, Uwe
--
address@hidden | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen
- Novice Questions, Colin Klipsch, 1999/04/14
- Re: Novice Questions,
Valeriy E. Ushakov <=