Hi,
we’ve encountered a reproducible issue with
TLMDScriptControl.Prepare() that appears to be a parser/compiler problem in Pascal-Script.
Prepare() hangs indefinitely for a specific syntax pattern.
Example Script:
var
i, x;
begin
x := 'a';
for i := 0 to 10 do
begin
if (x = 'a') or (x = 'x') then
ShowMessage('a')
else
ShowMessage('b');
end;
end;As far as we observed, the issue only occurs with this combination:
- for loop
- if..then..else
- or-condition
- parenthesized sub-expressions
Variations that work:
- Removing parentheses around the OR operands (if x = 'a' or x = 'x' then)
- Removing the else branch
- Removing the for loop
- Splitting the condition:
if x = 'a' then
...
else if x = 'x' then
...We encountered that Problem in LMD ScriptPack 2022.10 and 2025.4.
Is this a known issue in the Pascal-Script parser/compiler?