SRL Archive - Bugs

Delete procedure


Im4everlast

2013-10-21 19:53:09

EDIT:

This must be a bug.. Now after a couple of months I did a fresh install of Simba and tried getting this to work again.

The problem appears when using PascalScript and if the Delete procedure is used inside a procedure or a function. This does not happen when using Lape. I hope I am not doing something wrong with the script and wasting your time with this.. :/ The below picture should explain more.




Delete procedure is acting strange, it is giving me an error "Error: Exception: Too many parameters at line 106" when I use it "Delete(MainStr, 1, i + Length(StartStr))". Look at the image, it explains my problem.



Gu3st...

2013-10-21 20:14:21

var
s := 'test';

begin
delete(s, 1, 2);
writeLn(s);
end.
Compiled successfully in 156 ms.
st
Successfully executed.

works fine for me…

bonsai

2013-10-22 00:52:13

in the last screen shot there is no ';' at the end of the delete line

Im4everlast

2013-10-22 01:42:38

Doesn't work even after adding the ; I'll reinstall Simba.

Kevin

2013-10-22 13:47:22

How do you declare this MainStr?

bg5

2013-10-22 13:51:24

In newer versions of Simba compiler shows the error in line below it happens! Most likely it's complainig about
Exit();


Im4everlast

2013-10-23 01:07:20

From: bg5
In newer versions of Simba compiler shows the error in line below it happens! Most likely it's complainig about
Exit();


Thanks, Exit(); is causing it.
It worked with an older version of simba.