David Korn schrieb:
cc: [EMAIL PROTECTED]
Subject: Re: [ast-developers] More type problems
--------


File A_t contains:

   typeset -T A_t=(
     B_t b
   )

File B_t contains:

   typeset -T B_t=(
     integer n
   )

Both are in a directory which is included in FPATH. Is B_t supposed to be loaded automatically? What I get from

   A_t a

is:

   -ksh: B_t: not a known type name
   -ksh: A_t: not found [No such file or directory]

Apparently ksh wants B_t to be defined before A_t is sourced. I put an explicit "source B_t" at the beginning of A_t, but that didn't change anything.

This is a difficult one and the fix will not be in the next release.

The problem is that the parser has to know that B_t is a type.
I might be able to have the parser search FPATH which would fix you problem,
but I have to think about how to handle this in the compiler.
I might require that you put the command
        B_t
without arguments before typeset -T A_t

Hm, if I put the command B_t in the file A_t, I get the same errors as before. However, it works if 'B_t' is executed in the topmost level:

  #!/usr/bin/ksh
  FPATH=.
  B_t
  A_t a

There is still a problem if A_t contains an array declaration like

  typeset -T A_t=(
      B_t -a b
  )

This causes a segmentation fault.

Regards,
Bernd

--
Bernd Eggink
[EMAIL PROTECTED]
http://sudrala.de
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to