Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-03 Thread Arnaud de Montard via 4D_Tech
> Le 2 juin 2017 à 23:41, Garri Ogata via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > Greetings, > > Using Get pointer is another way of doing as well. Don't be confident in this, it fails in at least 2 situations: • compiled if the array is local • in a host/component context if the varia

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Douglas von Roeder via 4D_Tech
Tim: Auto correct? Ah, OK, I'll give you that one. :-) -- Douglas von Roeder 949-336-2902 On Fri, Jun 2, 2017 at 3:40 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com > wrote: > On Jun 2, 2017, at 5:24 PM,Douglas von Roeder wrote: > > > On Fri, Jun 2, 2017 at 12:20 PM, Tim Nevels via 4D_Tech

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Tim Nevels via 4D_Tech
On Jun 2, 2017, at 5:24 PM,Douglas von Roeder wrote: > On Fri, Jun 2, 2017 at 12:20 PM, Tim Nevels via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > >> quest to master a nuisance of the 4D language regarding pointers. > > "nuisance" (S/B "nuance") > > Careful, there - that floor is slippery, Dr.

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Garri Ogata via 4D_Tech
; on behalf of Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> Sent: Friday, June 2, 2017 7:55 PM To: 4D iNug Technical Cc: Chip Scheide; Tim Nevels Subject: Re: syntax : pointer to an element of a sub-array of 2D array I understand your thinking :) but... as this is going to be in a (

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Arnaud de Montard via 4D_Tech
> Le 2 juin 2017 à 20:56, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > [...] > Table and Field numbers > Table and Field pointers Just a suggestion, a "combo" makes possible to code fields in a single longint in place of pointers or pair of numbers table+field. Nice to put a

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Douglas von Roeder via 4D_Tech
On Fri, Jun 2, 2017 at 12:20 PM, Tim Nevels via 4D_Tech < 4d_tech@lists.4d.com> wrote: > quest to master a nuisance of the 4D language regarding pointers. "nuisance" (S/B "nuance") Careful, there - that floor is slippery, Dr. Freud! ;-) -- Douglas von Roeder 949-336-2902 ***

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Chip Scheide via 4D_Tech
I understand your thinking :) but... as this is going to be in a (compiled - I hope) component, I need to validate the hell out of the parameters, ESPECIALLY, pointers; as conceptually the component will be a black box. Input (via method call) -> component -> result actually the problems of

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Tim Nevels via 4D_Tech
On Jun 2, 2017, at 2:00 PM,Chip Scheide wrote: > Maybe I am too ambitious... > > (from Host) > > Build_Table_Arrays(->$Table_Names_array;->$Table_num_array;->$Table_Pointer_array) > This call would build 1D arrays with the (respectively) table names > (formatted for users), Table numbers, and p

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Chip Scheide via 4D_Tech
Yep :) I am not sure... Does this work in newer versions of 4D, or is this something that should be entered as a bug? Array text(My_2D-Array;5;10) c_pointer($ptr;$ptr2) $ptr:=->My_2D_Array $ptr2:=->$ptr->{1} // <- this fails : Field variable or table expected $ptr2:=->($ptr->{1}) // this fails

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Keisuke Miyako via 4D_Tech
sometimes its much easier to simply COPY ARRAY the whole array and back. > 2017/06/02 22:46、Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> のメール: > > And this is where the dereferencing a pointer to a 2D array, sub-array > access problem is occurring, inside the component method and it's > interna

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Chip Scheide via 4D_Tech
Everyone who has replied so far. Thanks I am still struggling with this, but I am now closer, and have some direction, I'll report back my final solution. The actual implementation I am working on is : In a component, a method which can build 1 or more arrays of table and field information from

Re: syntax : pointer to an element of a sub-array of 2D array

2017-06-02 Thread Arnaud de Montard via 4D_Tech
> Le 1 juin 2017 à 22:10, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > I have a pointer to a 2D array > Array text($My_Array;5;10) > $ptr:=->$My_Array > [...] > The above syntax does not seem to work, can someone help with syntax? Turnarounds I could find (execute formula, Ge

RE: syntax : pointer to an element of a sub-array of 2D array

2017-06-01 Thread Timothy Penner via 4D_Tech
It almost seems like you are doing the inverse of what is described here: http://kb.4d.com/assetid=48814 Try this: C_POINTER($ptr) ARRAY TEXT($My_Array;5;10) $ptr:=->$My_Array{1} My_Method ($ptr) -Tim ** 4D Internet Users Gro

syntax : pointer to an element of a sub-array of 2D array

2017-06-01 Thread Chip Scheide via 4D_Tech
I have a pointer to a 2D array Array text($My_Array;5;10) $ptr:=->$My_Array I know that $ptr->{2} will reference the sub-array (of 10 elements) at element 2. I need to provide a pointer to this sub-array ex: My_Method(->($ptr->{1})) The above syntax does not seem to work, can someone help with