Search found 55 matches

by cfbsoftware
Tue Jan 05, 2021 8:01 pm
Forum: Component Pascal
Topic: A REAL bad program compiles well
Replies: 11
Views: 15219

Re: A REAL bad program compiles well

FYI I checked your example with the Gardens Point Component Pascal compiler and it gave the error message: RealTest.cp(8,7) : error : Expression not assign-compatible with destination RealTest.cp(8,7) : error : LHS type was SHORTREAL, RHS type was REAL When the procedure was changed to PROCEDURE Rea...
by cfbsoftware
Fri Oct 09, 2020 11:59 am
Forum: Bug
Topic: Trap on [code] procedure call
Replies: 6
Views: 13782

Re: Trap on [code] procedure call

Josef Templ wrote:the first parameter is passed as register eax but in case of a RECORD value parameter this is not possible.
Additionally, it is not possible in the case of an ARRAY value parameter.
by cfbsoftware
Tue Oct 06, 2020 12:14 am
Forum: Bug
Topic: Trap on [code] procedure call
Replies: 6
Views: 13782

Re: Trap on [code] procedure call

For anybody who is interesting in investigating this further, the key points I have found that contribute to the failure are: 1. It is a code procedure 2. The parameter is a record 3. The parameter r is a value, not a VAR parameter e.g. If the parameter is an INTEGER, or a record passed as a VAR the...
by cfbsoftware
Tue Aug 25, 2020 11:05 pm
Forum: Bug
Topic: MAX with two arguments
Replies: 10
Views: 15849

Re: MAX with two arguments

Do the same issues apply to the MIN function? If they do then any possible rework to MAX should be considered for MIN as well. If they don't then it is likely that similar code patterns for MIN could be used. There are a significant number of variations of valid / invalid parameter combinations for ...
by cfbsoftware
Tue Jun 23, 2020 8:07 pm
Forum: Component Pascal
Topic: Forward type declarations
Replies: 2
Views: 8355

Re: Forward type declarations

I don't exactly know why this is so, but the document called What's New in Component Pascal (CP-New.odc) included with BlackBox summarises the language enhancements compared to Oberon-2. The general aim of these language enhancements is described as follows: The language revision was driven by the e...
by cfbsoftware
Thu Jun 11, 2020 12:14 pm
Forum: Bug
Topic: Compiler TRAPs with simple CONST expression
Replies: 10
Views: 17517

Re: Compiler TRAPs with simple CONST expression

This is an interesting one. I checked some other Oberon-based compilers. This behaviour is actually documented in The Oberon Companion as follows: How ASSERT statements are treated by the compiler The compiler evaluates the boolean expression of ASSERT statements with the following outcome: - if an ...
by cfbsoftware
Fri Jun 05, 2020 10:51 am
Forum: Bug
Topic: Compiler TRAPs with simple CONST expression
Replies: 10
Views: 17517

Re: Compiler TRAPs with simple CONST expression

Chris - I guess that the reason your very simple example has not been found by accident in the last 20 odd years is that it is so simple that every one has manually simplified it further before giving it to the compiler. Yes. It would be more common to see variables in BOOLEAN expressions rather th...
by cfbsoftware
Fri May 29, 2020 10:39 pm
Forum: Bug
Topic: Compiler TRAPs with simple CONST expression
Replies: 10
Views: 17517

Re: Compiler TRAPs with simple CONST expression

What I have found so far to be the minimum example which fails to compile is:

Code: Select all

MODULE  AaaConstTest1;

CONST
  logTop  =  FALSE;

VAR
  b: BOOLEAN;

BEGIN
  b := (b OR ~logTop) & logTop; 
END  AaaConstTest1.
by cfbsoftware
Mon Aug 12, 2019 11:52 am
Forum: Component Pascal
Topic: about CASE string OF
Replies: 8
Views: 17472

Re: about CASE string OF

I also use the technique: CASE name[0] OF | "A": IF name = "ARRAY" THEN sym := array etc. in the Astrobe compilers. It is the most efficient of the suggestions here. It is also used in the BlackBox compiler (Dev\CPS.odc) and John Gough's Gardens Point Component Pascal compiler. L...
by cfbsoftware
Mon Apr 15, 2019 11:47 am
Forum: Common questions
Topic: How to move a BlackBox document view to the second monitor?
Replies: 16
Views: 22810

Re: How to move a BlackBox document view to the second monit

I grab the right hand edge of the window with the mouse and drag it across the gap between the two screens to the other screen. Can you move the Blackbox window from one screen to the other? If you can do that you should be able to move it so that half is on one monitor and the other half is on the ...