Re: [fpc-pascal] Problem with array of const

2017-10-29 Thread Tony Whyman
I've fallen into various traps with array of const before. I would always recommend that: 1. Test the vType before accessing the argument value and raise an exception if it is not what is expected. You are dealing with a free union and the compiler may not always do what you expect it to. 2.

Re: [fpc-pascal] Problem with array of const

2017-10-28 Thread pascalX
Od: Darius Blaszyk > Komu: FPC-Pascal users discussions > Datum: 29.10.2017 00:59 > Předmět: [fpc-pascal] Problem with array of const > Consider the application below. When I run it I do get the following output: name rgname�F&{---C000-0046

Re: [fpc-pascal] Problem with array of const

2017-10-28 Thread pascalX
Od: Darius Blaszyk > Komu: FPC-Pascal users discussions > Datum: 29.10.2017 00:59 > Předmět: [fpc-pascal] Problem with array of const > Consider the application below. When I run it I do get the following output: name rgname�F&{---C000-0046

Re: [fpc-pascal] Problem with array of const

2017-10-28 Thread Vojtěch Čihák
discussions Datum: 29.10.2017 00:59 Předmět: [fpc-pascal] Problem with array of const Consider the application below. When I run it I do get the following output: name rgname�F&{---C000-0046} In other words I lose the first character (a) from the arguments supp

[fpc-pascal] Problem with array of const

2017-10-28 Thread Darius Blaszyk
Consider the application below. When I run it I do get the following output: name rgname�F&{---C000-0046} In other words I lose the first character (a) from the arguments supplied and the string returns with a lot of garbage. What am I doing wrong here? Rgds, Da