> Le 31 oct. 2017 à 21:47, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> a
> écrit :
>
> Peter,
> This is easy to do with local arrays and dynamic variables. It looks like
> you only need to build text arrays. You can declare a local array, ARRAY
> TEXT($aText2d;0;0). Then you can resize this
Hi Kirk
Yes all the arrays are Text Arrays.
My aim is to import all the data and load it into the various arrays. The
basic problem is that I dont know in advance, how much data there will be.
Think of it like this.
There maybe beween 1 and lets say 16 audio channels.
each audio channel maybe
Peter,
This is easy to do with local arrays and dynamic variables. It looks like
you only need to build text arrays. You can declare a local array, ARRAY
TEXT($aText2d;0;0). Then you can resize this to add more 'columns' as
needed and populate them.
Next you need to populate the listbox. First
OK
thanks
There will be a maximum of 16 passes through the loop, with a maximum of 14
arrays declared on each pass.
each array could have between 1 and a couple of hundred elements. it
depends on the size of the original document, from where all the original
data is imported. each one of the 14
Peter,
IF your code will never be compiled the first code I sent will work,
and you will be creating arrays 'on the fly', if you do this, I suggest
you create local arrays, array names starting with a '$', so that they
are thrown away at the end of the process/method.
IF you code will EVER be
compiler declaration(s)
Array (Variable_Name;Size)
is the type of the array you want, text, longint, etc
On Tue, 31 Oct 2017 19:42:42 +, Peter Mew via 4D_Tech wrote:
> Thank You
> And How do I create the Arrays in the First Place
> -pm
>
> On Tue, Oct 31, 2017 at 7:32 PM, npdennis
some pseudo code to follow:
an out line would be:
if the code is not compiled the following will work, if it is (or is
going to be) then you need to create the arrays before hand. For the
example all arrays are text.
Array pointer($New_Array_Handles;0)
For ($i;1;$Number_Of_Arrays)
> but that doesnt work, hence my question
If you want to run compiled you will need to use a list box to create dynamic
arrays… or declare every possible combination you will use in a method and use
get pointer…
However in your case you might be able to use a 2D array, or depending on what
A past discussion mentioned creating arrays on the fly using a Listbox command
that creates columns.
This is for an array listbox.
http://livedoc.4d.com/4D-Language-Reference-16.2/List-Box/LISTBOX-INSERT-COLUMN.301-3433513.en.html
C_POINTER($NilPtr)
LISTBOX INSERT
OK
If I read that correctly, that will create the arrays for pass 1 through
the loop, but what about creating the arrays for pass 2, and any subsequent
passes.
I expected to create the arrays, as they were needed, for each pass.
something like
For ($i;1;Size of array(EDLBlockArray))
If ($i<10)
> And How do I create the Arrays in the First Place
If you are running compiled you I think will need to type the arrays in a
method someplace so the compiler knows about the arrays. I know that some
variable types don’t need compiler declarations, but I think arrays do.
// Some method maybe a
Thank You
And How do I create the Arrays in the First Place
-pm
On Tue, Oct 31, 2017 at 7:32 PM, npdennis wrote:
> > Im pretty sure I need to use pointers to accomplish this, but I dont
> know how.
>
> Try the command Get Pointer…
>
> $p:=Get Pointer(“Array201”)
> or
>
> Im pretty sure I need to use pointers to accomplish this, but I dont know how.
Try the command Get Pointer…
$p:=Get Pointer(“Array201”)
or
$x:=201
$p:=Get Pointer(“Array”+string($x))
However compiled you may need to have the arrays declared some place.
Neil
Hi
I want to achieve the following:
To Loop through a block of code (the number of times will be determined
elsewhere, but may well be different each time).
Create a set of arrays that will have the same name + the loop counter, for
each pass through the loop
So pass 1 might create 3 arrays called
14 matches
Mail list logo