Search found 26 matches

by Zorko
Tue Oct 29, 2019 5:11 pm
Forum: Feature
Topic: Strings concatenation optimisation
Replies: 14
Views: 24053

Re: Strings concatenation optimisation

Now the operation of the form s := s$ + "something" implemented as follows: the string s is copied into itself in a loop, which also searches for the terminating 0X and also checks the string (buffer) length, for generating trap when out of the string. Basic copying is done using instructi...
by Zorko
Wed May 29, 2019 11:46 pm
Forum: Bug
Topic: POINTER TO ARRAY [untagged] accepted as the tagged ARRAY
Replies: 4
Views: 10053

Re: POINTER TO ARRAY [untagged] accepted as the tagged ARRAY

Very nice patch, Wening Luo! I tested it and it works fine. Since the module DevCPB is not included in CPfront, I can't use your patch directly, so I have to make a fix in back-end too, as in BlackBox now. In this case, BlackBox can be a host system for CPfront with your patch, and without it. Every...
by Zorko
Wed May 29, 2019 1:53 am
Forum: Bug
Topic: POINTER TO ARRAY [untagged] accepted as the tagged ARRAY
Replies: 4
Views: 10053

Re: POINTER TO ARRAY [untagged] accepted as the tagged ARRAY

Note: an untagged array with an explicitly specified length is equal to a tagged: VAR s: POINTER TO ARRAY [untagged] 10 OF SHORTCHAR; PROCEDURE Call (a: ARRAY OF SHORTCHAR); END Call; BEGIN Call(s); (* <- compatible *) I didn't know that, and my correction above doesn't take that into account.
by Zorko
Tue May 28, 2019 11:02 pm
Forum: Bug
Topic: POINTER TO ARRAY [untagged] accepted as the tagged ARRAY
Replies: 4
Views: 10053

Re: POINTER TO ARRAY [untagged] accepted as the tagged ARRAY

P.S. I foresee disputes that any fix should introduce new functionality or fix existing problems. But it's a really existing problem that the validation that needs to be done at the foreground level, since it involves type checking, takes it to the background. It's like trying to plug a crack. I am ...
by Zorko
Tue May 28, 2019 11:00 pm
Forum: Bug
Topic: POINTER TO ARRAY [untagged] accepted as the tagged ARRAY
Replies: 4
Views: 10053

POINTER TO ARRAY [untagged] accepted as the tagged ARRAY

My colleague faced this problem in CPfront. MODULE Test; IMPORT SYSTEM; VAR s: POINTER TO ARRAY [untagged] OF SHORTCHAR; PROCEDURE Call (IN s: ARRAY OF SHORTCHAR); END Call; BEGIN Call(s) END Test. CPfront allows this code and even generates some representation in C language, which of course will n...
by Zorko
Tue May 29, 2018 9:00 pm
Forum: Bug
Topic: Refinement of DevCPP.GetCode
Replies: 18
Views: 29022

Re: Refinement of DevCPP.GetCode

I agree with Wening Luo.

A string in

Code: Select all

 procedures in general has very specific application, and a big programmer's accuracy is necessary here. Therefore it is good when a translator will warn of a meaningless design.
by Zorko
Mon May 14, 2018 12:45 pm
Forum: Bug
Topic: Refinement of DevCPP.GetCode
Replies: 18
Views: 29022

Re: Refinement of DevCPP.GetCode

I tested this code, and it works fine on all my tests that I used. With the exception of one moment! Empty strings are still allowed. Do you see any practical meaning in this? PROCEDURE {code} Proc1"", "", "", 9, "", "" ; (* <= now it compiles! *) I'...
by Zorko
Wed May 02, 2018 5:57 pm
Forum: Bug
Topic: Refinement of DevCPP.GetCode
Replies: 18
Views: 29022

Re: Refinement of DevCPP.GetCode

OberonCore did not accept any of our improvements of GetCode. It applies to the removal of the limit for the size of a code procedure (my correction) and the ability to specify several strings in a code procedure (the correction proposed by Josef). Accordingly, I am sure that they will not accept th...
by Zorko
Tue May 01, 2018 7:09 pm
Forum: Bug
Topic: Refinement of DevCPP.GetCode
Replies: 18
Views: 29022

Re: Refinement of DevCPP.GetCode

Helmut, I totally agreed with you. An empty parameter should allow as it is now. My corrections do not affect the empty parameters. It only strengthens the checking of incorrect syntax in declaration of code procedures (empty strings, multiple and missed commas).
by Zorko
Tue May 01, 2018 7:05 pm
Forum: Bug
Topic: Refinement of DevCPP.GetCode
Replies: 18
Views: 29022

Re: Refinement of DevCPP.GetCode

I'm sure that if there is somewhere code that uses this incorrect syntax (with multiple commas) then this code is worthy of minor correction. In any case this situation will not create any serious problems. Agree with me, please. :-)