Arrays of string passed to a function gets wrong ranges
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
If I pass an array of string of range 1..20 for example, as a parameter to a funcion, it seems it changes its range for 0..something. I'll explain myself: If I set array[1] as 'hello' [2] as 'hola' and [3] as 'ciao', when I pass that array to a function (by value, didn't try by reference), and try to acces the passed array, array[1] returns 'hola' (wich was array[2] value outside the function), array[2] returns 'ciao' and array[3] returns nothing. And if I access array[0] inside the function, it returns 'hello', wich was array[1] outside the function.
The problem doesn't happend if that array is inside a register though.
Additional information:
Reporter: Ray McCoy
EMail: McCoy51 at hotmail dot com
Mantis conversion info:
- Mantis ID: 5494
- OS: Linux
- Version: 1.9.4