Search found 87 matches

by luowy
Tue Jul 28, 2020 11:11 am
Forum: Bug
Topic: Compiler trap in Real64 op ADR(x)
Replies: 13
Views: 21185

Re: Compiler trap in Real64 op ADR(x)

The earlier is the better, the DevCPL is lower than DevCPC, it's better to correct it whithin the frontend instead of the backend. This is just my opinion, Not a rule; P.S. It seems I can't post at the other discussion page the center forum need a membership, You need to apply for one, you can ask I...
by luowy
Tue Jul 28, 2020 9:16 am
Forum: Bug
Topic: Compiler trap in Real64 op ADR(x)
Replies: 13
Views: 21185

Re: Compiler trap in Real64 op ADR(x)

another choice: DevCPC486.ConvMove ELSE (* not sysval *) (* int -> float *) IF y.form =Pointer THEN y.form:=Int32 END;(*add this line*) IF y.mode = Reg THEN Push(y) END; or DevCPC486.GetAdr: x.form := Int32(*Pointer*); x.typ := DevCPT.int32typ(*anyptrtyp*); Assert(x, hint, stop); I prefer first one.
by luowy
Sat Jul 25, 2020 12:05 pm
Forum: Bug
Topic: Compiler trap in Real64 op ADR(x)
Replies: 13
Views: 21185

Re: Compiler trap in Real64 op ADR(x)

adimetrius wrote:Suggested temporary fix:
thanks your work!
yes, the bug is in the bakckend, your fixup worked well;
I created a discussion post on the center board https://forum.blackboxframework.org/vie ... f=40&t=790
by luowy
Fri Jul 24, 2020 8:33 am
Forum: Bug
Topic: Compiler trap in Real64 op ADR(x)
Replies: 13
Views: 21185

Compiler trap in Real64 op ADR(x)

This is an example that leads to a compiler trap:

Code: Select all

MODULE TestBugs;

   IMPORT SYSTEM;
   
   PROCEDURE Do();
      VAR
      r: REAL;
      x: INTEGER;
   BEGIN
      r := r+ SYSTEM.ADR(x);
   END Do;

END TestBugs.
by luowy
Wed Jul 22, 2020 8:04 am
Forum: Component Pascal
Topic: About the identifier behind the number
Replies: 3
Views: 9063

About the identifier behind the number

I accidentally wrote the following code:

Code: Select all

name: ARRAY 256OF CHAR;
It passed the compiler!Although the formatter can formats it into a standard form

Code: Select all

name: ARRAY 256 OF CHAR;
I'm not sure it is a bug, What do you think?
by luowy
Wed Jul 15, 2020 3:14 am
Forum: BlackBox Framework
Topic: Views.Old doesn't impement documentation specs
Replies: 5
Views: 10475

Re: Views.Old doesn't impement documentation specs

Usually the documentation is outdated than the source code; If the documentation is incorrect and no bugs in the source code, it is better to modify the documentation rather than the source code. This is a basic interface, many modules depend on it, changing it without checking other modules will ca...
by luowy
Tue Jul 14, 2020 7:17 am
Forum: BlackBox Framework
Topic: Views.Old doesn't impement documentation specs
Replies: 5
Views: 10475

Re: Views.Old doesn't impement documentation specs

after play your code, MODULE ObxOldView; IMPORT Converters, Views, TextViews, Log := StdLog, Files; PROCEDURE OldView* (); VAR conv: Converters.Converter; name: ARRAY 256 OF CHAR; loc: Files.Locator; v: Views.View; BEGIN name :=(* 'picture';*)'picture.png'; loc := Files.dir.This(""); conv ...
by luowy
Sun Jul 12, 2020 3:38 am
Forum: Bug
Topic: ENTIER / Math.Floor bug
Replies: 4
Views: 8914

Re: ENTIER / Math.Floor bug

this is a problem of precision loss in conversion from 80bit to 64bit; 1, the input: in your example, actually, v := M.Sqrt(n) + 0.5; (* 94906268.0 *) but if you make a comparison , you will get: v > M.Sqrt(n) + 0.5 is TRUE; it means M.Sqrt(n) + 0.5 in 80bit is less the 94906268.0; M.Sqrt(n) + 0.5 =...
by luowy
Sat Jul 11, 2020 1:27 am
Forum: BlackBox Framework
Topic: Views.Old doesn't impement documentation specs
Replies: 5
Views: 10475

Re: Views.Old doesn't impement documentation specs

Do you have an example to demonstrate your explanation?
by luowy
Fri Jul 10, 2020 3:37 pm
Forum: BlackBox Framework
Topic: [untagged] magic
Replies: 2
Views: 8082

Re: [untagged] magic

[untagged] is P-S-I, implemented without careful document, if you understand this assignment is legal: s:=a; (* s: POINTER TO ARRAY [untagged] OF CHAR; a:ARRAY 32 OF CHAR; *) untagged pointer of array can be assigned by a tagged array, the value of the pointer will be the address of the first elemen...