Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP incorrectly generates a reference to a variable placed in the library, which causes a MADS compilation error. #110

Closed
GSoftwareDevelopment opened this issue Nov 28, 2022 · 3 comments

Comments

@GSoftwareDevelopment
Copy link
Contributor

The following code should compile smoothly.

unit test2_lib;

interface

var
    fn:String[80];

implementation

end.

//

uses test2_lib;

procedure proc();
var
    l:byte;

begin
    l:=length(fn);
end;

begin
    fn:='ATARI RULEZ!';
    proc();
end.

The error occurs regardless of whether the variable is called from a procedure or in the main block.

There is a similar effect with the constants declared in the library, which are used e.g. in the assembler code, although here, one could suppose that it is supposed to be so. Simply, the labels from the main namespace of the library, do not get the equivalent in the main namespace of the program using it Sent As in ASM I can still refer to the namespace of the library, but using test2_lib.fn does not give this effect

@tebe6502
Copy link
Owner

issue #110 (LENGTH) fixed

@GSoftwareDevelopment
Copy link
Contributor Author

Przy Length błąd zniknął, jednak (okazuje się) że jest jeszcze przy przypisaniu string:=string; i przy byte:=byte(string[0]);

@tebe6502
Copy link
Owner

tebe6502 commented Dec 2, 2022

fixed

@tebe6502 tebe6502 closed this as completed Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants