Works for me if I index arrays starting at 1 instead of 0. I always mix that up... On Tue, Dec 02, 2014 at 09:17:50PM -0600, Jim Snowbarger wrote: If you want to call a function, and have it generate an array of data and return it back to you, what is the right way to do that? According to the script manager, it seems that a function can not have an array data type, so apparently you can't return an array. Is that correct? So, do you need to pass the array in by reference, and modify it inside the function? If you do that, I presume the array needs to actualy be created with the "new" statement out in the calling function. For example: Var stringArray s S = new stringArray[30] myFunc(s) But, in this example, you would need to be able to declare the function parameter as a byRef array. And, According to the script manager, a parameter can not be of an array type. But, the following fragment of jibberish will compile, but does not work. void function x(stringArray byref s) s[0] = "hello" EndFunction Script test () var stringArray a SayString ("beep") Let a = new stringArray[5] x(a) SayString (a[0]) EndScript Compiles great, but doesn't speak the word, hello. The following also compiles, and it doesn't work either! stringArray function x() var stringArray s s = new stringArray[5] s[0] = "hello" return(s) EndFunction Script test () var stringArray a a = x() SayString (a[0]) EndScript Can somebody set me straight here? How is this supposed to be done? Thanks. __________??? View the list's information and change your settings at //www.freelists.org/list/jawsscripts -- Doug Lee, Senior Accessibility Programmer SSB BART Group - Accessibility-on-Demand mailto:doug.lee@xxxxxxxxxxxxxxxx http://www.ssbbartgroup.com "While they were saying among themselves it cannot be done, it was done." --Helen Keller __________� View the list's information and change your settings at //www.freelists.org/list/jawsscripts