Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
sturgessb wrote:I dont see anything in the docs about not being able to use boundedstring in array, is this the case?
You can define arrays of bounded string types and the ZBasic compiler proper accepts it. There appears to be a code generation issue for accessing an element of an array of bounded strings in native mode; the back-end compilation process generates an error.
sturgessb wrote:Also, is there any theoretical speed difference between the following two block of code.
For variables that don't get special initialization treatment (such as Integer, Byte, etc.) there should be no difference. For variables that do get special initialization/deinitialization treatment (such as String) having the definition outside of the loop would reduce the number of times the variable is initialized and deinitialized.
sturgessb wrote:So with regards the the bounded string issue, so are you saying thats a problem with the native compiler not something I'm doing?
That's my contention. The error message that I'm seeing indicates that one or more errors occurred during the back-end build process. That is indicative of a code generation issue. If it were something that you were doing incorrectly in your code, it would never get as far as invoking the back-end compilation process.
If you're seeing a different error message, then we're not on the same page yet. Usually, a minimal example that replicates the issue is very helpful to ensure that we understand one another.