[Oberon] Importing string constants in PO

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Tue Feb 20 22:25:36 CET 2018

  > Thanks for clarification. Although I  think
  > ORG.Mod should be updated to give an
  > error when importing string constants,
  > like I will do in my ORGx.Mod
  > Peter

I think you are right. This is perhaps the better
thing to do.

I just sketched what changes to the compiler
would be needed to *allow* (and correctly handle)
access to imported string constants. 

And now that I have done THAT (it’s not difficult, but
it requires some shenanigan with item conversions in
ORG.loadStringAdr, ORG.StrToChar, ORG.CopyString,
etc. to use the SB base of the exporting module if
needed, and also setting org.lev also for constants),
I agree with you that one should just issue an error 
message when an external string is accessed -
which of course is a trivial change to the compiler.
Or not even allow string constants to be exported
in the first place. This would effectively turn them
into aliases for string literals visible only in the
module where they are declared.

One of those things that one *could* debate
endlessly, but where a debate is not really
worth our time..


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20180220/307c63f5/attachment.html>

More information about the Oberon mailing list