Search found 26 matches
- Sat Jan 15, 2022 10:03 pm
- Forum: Bug
- Topic: VAR [nil] for tagged structural parameters
- Replies: 3
- Views: 10873
Re: VAR [nil] for tagged structural parameters
After this fix, I found one entry in the module WinApi: PROCEDURE [stdcall] SetDIBColorTable* (p0: HDC; p1: INTEGER; p2: INTEGER; VAR [nil] p3: ARRAY OF RGBQUAD): INTEGER; Where RGBQUAD is an untagged record, but p3 is an open tagged array with the length passed to the procedure inside. For array as...
- Sat Jan 15, 2022 9:48 pm
- Forum: Bug
- Topic: VAR [nil] for tagged structural parameters
- Replies: 3
- Views: 10873
Re: VAR [nil] for tagged structural parameters
Refinement of corrections (we need to additionally check the tagging of a structure):
Code: Select all
ELSIF (sys # 0) & ((typ.comp = Record) OR (typ.comp = DynArr)) & ~typ.untagged THEN err(142)
- Sat Jan 15, 2022 1:56 pm
- Forum: Bug
- Topic: VAR [nil] for tagged structural parameters
- Replies: 3
- Views: 10873
VAR [nil] for tagged structural parameters
It is now possible to declare the following parameter: MODULE Win; IMPORT SYSTEM; PROCEDURE Proc (VAR [nil] lpModuleName: ARRAY OF CHAR); END Proc; BEGIN Proc(NIL) END Win. But this makes no sense, since ARRAY is not an untagged pointer, it is a tagged structure with length storage. The same about R...
- Mon Sep 13, 2021 5:38 pm
- Forum: Feature
- Topic: Strings.IntToStringForm: convert a number to Oberon format
- Replies: 2
- Views: 30106
Strings.IntToStringForm: convert a number to Oberon format
I propose to increase the functionality of the procedure Strings.IntToStringForm. There is an input parameter MinWidth, which is responsible for the minimum number of output characters of a converted number. Any the number can take up one or more characters. But still, ASSERT inside this procedure a...
- Sun Aug 23, 2020 2:09 am
- Forum: Bug
- Topic: MAX with two arguments
- Replies: 10
- Views: 17567
Re: MAX with two arguments
adimetrius , I tested your fix and found it perfectly. Thank you! In descritpion of CPlang of MIN and MAX with two arguments: MAX(x, y) <= INTEGER INTEGER the larger value of x and y integer type LONGINT <= SHORTREAL SHORTREAL numeric type REAL SHORTCHAR SHORTCHAR character type CHAR MIN(x, y) <= I...
- Fri Nov 08, 2019 8:12 am
- Forum: Bug
- Topic: Unimplemented feature in SYSTEM.VAL
- Replies: 1
- Views: 9169
Unimplemented feature in SYSTEM.VAL
Code: Select all
MODULE Test; IMPORT SYSTEM;
VAR r: REAL;
BEGIN
r := SYSTEM.VAL(REAL, 7FEFFFFFFFFFFFFFL)
END Test.
- Mon Nov 04, 2019 5:43 pm
- Forum: Feature
- Topic: Strings concatenation optimisation
- Replies: 14
- Views: 25746
Re: Strings concatenation optimisation
Note that copying the string is not even in itself, but in some buffer? mov edi, 1677721600 \ mov esi, 1677721606 / not the same address Question: why does BlackBox need this buffer if this optimization case involves using the string itself as the buffer? Still, something tells me that all is not we...
- Mon Nov 04, 2019 5:38 pm
- Forum: Feature
- Topic: Strings concatenation optimisation
- Replies: 14
- Views: 25746
Re: Strings concatenation optimisation
Then why does the current compiler use string copying in the first operation instead of just counting its length (search 0X)? Specifically calling CPC486.AddCopy and CPV486.AddCopy to do this., i.e.: MODULE TestConcat; VAR a: ARRAY 100 OF CHAR; BEGIN a := a + "abc" (* a := a$ + "abc&q...
- Mon Nov 04, 2019 3:57 am
- Forum: Feature
- Topic: Strings concatenation optimisation
- Replies: 14
- Views: 25746
Re: Strings concatenation optimisation
luowy is right. I like that he is open to new ideas. Josef has a point too. Please, answer the question: do we have a technical possibility at the time of constructing the concatenation operation of the form s := s + "a" + s to find out whether the string s is present in the chain of adde...
- Tue Oct 29, 2019 5:15 pm
- Forum: Feature
- Topic: Strings concatenation optimisation
- Replies: 14
- Views: 25746
Re: Strings concatenation optimisation
What about
, such operation is now decomposed into three operations:
And the buffer overflow check happens in every operation here. And the search for the final 0X occurs here even twice.
Code: Select all
s := s + "xxx" + s;
Code: Select all
s := s; s += "xxx"; s += s;