LC 8 - RC 1 on Windows 10 - Old scripts failing
Posted: Mon May 02, 2016 4:51 am
Hi everyone,
I have been using LC for almost three years now and have upgraded to later versions several times without too much trouble. I have just recently upgraded to LC8-RC1 as I needed to use a couple of the new widgets (browser and others). I came across a couple of problems in old code that hasn't changed in quite a while.
- First problem was that I had to change most of my usage of char to byte, and offset to byteOffset. According to the dictionary the behaviour is slightly different although it has never actually caused a problem using char before. As soon as I got to LC8 about half of my char uses started failing. Got around that OK by changing to byte and byteOffset as I mentioned.
- Second and more serious problem. I do a lot of text handling and use replace extensively. I now find that some code that has been running fine for a couple of years is now failing and I cannot figure out why. Is there a change in the way the replace works? The code is involved in emulating some PICK/Universe/openQM functions for date handling. One example code segment is as follows...
put "D4/EP" into anyVariable
... other code here ...
replace "D" with "" in anyVariable ............... result in anyVariable is "D4/EP" - "D" is NOT replaced
... other code here ...
replace "4" with "" in anyVariable ............... result in anyVariable is "D/EP" - "4" is replaced OK
... other code here ...
replace "E" with "" in anyVariable ............... result in anyVariable is "D/EP" - "E" is NOT replaced
... other code here ...
replace "P" with "" in anyVariable ............... result in anyVariable is "D/EP" - "P" is NOT replaced
... other code here ...
Has the behaviour of the replace command changed? Does anyone have any ideas?
regards Geoff Macumber.
I have been using LC for almost three years now and have upgraded to later versions several times without too much trouble. I have just recently upgraded to LC8-RC1 as I needed to use a couple of the new widgets (browser and others). I came across a couple of problems in old code that hasn't changed in quite a while.
- First problem was that I had to change most of my usage of char to byte, and offset to byteOffset. According to the dictionary the behaviour is slightly different although it has never actually caused a problem using char before. As soon as I got to LC8 about half of my char uses started failing. Got around that OK by changing to byte and byteOffset as I mentioned.
- Second and more serious problem. I do a lot of text handling and use replace extensively. I now find that some code that has been running fine for a couple of years is now failing and I cannot figure out why. Is there a change in the way the replace works? The code is involved in emulating some PICK/Universe/openQM functions for date handling. One example code segment is as follows...
put "D4/EP" into anyVariable
... other code here ...
replace "D" with "" in anyVariable ............... result in anyVariable is "D4/EP" - "D" is NOT replaced
... other code here ...
replace "4" with "" in anyVariable ............... result in anyVariable is "D/EP" - "4" is replaced OK
... other code here ...
replace "E" with "" in anyVariable ............... result in anyVariable is "D/EP" - "E" is NOT replaced
... other code here ...
replace "P" with "" in anyVariable ............... result in anyVariable is "D/EP" - "P" is NOT replaced
... other code here ...
Has the behaviour of the replace command changed? Does anyone have any ideas?
regards Geoff Macumber.