1. eu4.0 lw complains

HI

eu 4.0

lw is complaining that boolean has not been declared.

Have tried adding std/types.e, no difference, and a type boolean to each of the files (happens in others too). Running with exw and ex.

Its late, and its probably something really simple and stupid.

Chris

new topic     » topic index » view message » categorize

2. Re: eu4.0 lw complains

ChrisB said...

HI

eu 4.0

lw is complaining that boolean has not been declared.

Yes, the language wars game needs some fixing.

The problem here is that 'public' symbols do not work quite the same as 'global' symbols. Public symbols are only visible in the file the symbol is declared in and the file that includes that file. A global symbol can be visible even if you didn't explicitly include the file that declared it. A lot of programs got a bit 'lazy' and referred to symbols even if they didn't include the files that declared them. And this is the case in lw.ex because now the symbols in the standard library that used to be global are now public. This means that if you code what to use a public symbol you need to explicitly include the file in which that symbol was declared.

This will lead to more readable programs and less accidental bugs that refer to unintended symbols.

To fix the langwar files, we need to add the required include statements.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu