Arrays
Posted: Tue Apr 24, 2012 6:04 pm
Hey guys, this is probably a noobish sort of question but I've never had to deal with it before, so bare with me okay. I'm writing a plugin for LC 5.5 which stores information in a multidimensional array however the data can be loaded and unloaded at runtime and one of the checks I need to perform in some cases is to ensure the array is valid I.E. it isn't empty.
And despite the If tArray = Empty Then ... syntax being the most logical method of checking, it doesn't seem to work, tArray equates to empty either way. So I ask how does one check an array to ensure it isn't empty before working on it. I do have the idea to check to make sure a specific property exists but I thought it would be nice to ask here first just in case there is an obvious method and I'm just writing unneccessary code to accomplish it.
PS. Discovered ArrayEncode, ArrayDecode and the ability to store images as binary inside a custom property, just goes to show, you can still find a gem every so often even if like me you've been programming with Rev since the early days. Also going to be using LiveCode next year for my final year project at Uni.
And despite the If tArray = Empty Then ... syntax being the most logical method of checking, it doesn't seem to work, tArray equates to empty either way. So I ask how does one check an array to ensure it isn't empty before working on it. I do have the idea to check to make sure a specific property exists but I thought it would be nice to ask here first just in case there is an obvious method and I'm just writing unneccessary code to accomplish it.
PS. Discovered ArrayEncode, ArrayDecode and the ability to store images as binary inside a custom property, just goes to show, you can still find a gem every so often even if like me you've been programming with Rev since the early days. Also going to be using LiveCode next year for my final year project at Uni.
