I'm don't quite get that. Why do you make a type that only holds a single
variable as an array ?? Aren't types mostly used for defining a combination
of several variables ?

And is array not a reserved word in MapBasic ???

But anyway: Would this work ?

type trow
        colJ() as float
end type
 
type tarray
        nrow as integer
        rowI() as trow
end type

Or are you not able to do this:

Dim arrTs as tarray
ReDim arrTs.rowI(12)

Well, as I mentioned in my first mail...beware !!!


Peter Horsb�ll M�ller
GIS Developer
COWI A/S - Geografisk Information & IT
Rug�rdsvej 55
DK 5000 Odense C

Tel       +45 6313 5013
Direct    +45 6313 5008
Mobil     +45 2270 4308
Fax       +45 6313 5090    

Kampsax blev i juni 2002 overtaget af COWI. I forbindelse med den
igangv�rende integrationsprocess udskiftes vores Kampsax e-mail adresser med
COWI e-mail adresser.Hjemmesideadresser forbliver u�ndrede


> -----Original Message-----
> From: Jacques Paris [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 31, 2003 1:52 PM
> To: Peter Horsb�ll M�ller; MIL
> Subject: RE: MI-L Mapinfo.Net ?
> 
> 
> I have tried to develop that concept a little further to make 
> it more like a standard x(i,j) type array and here is the way 
> I have implemented it
> 
> type trow
>       colJ(2) as float
> end type
> 
> type array
>       nrow as integer
>       rowI() as trow
> end type
> 
> dim vrow as trow, arr as array
> 
> dim i, j as smallint
> 
> arr.nrow=3
> redim arr.rowI(arr.nrow)
> 
> for i=1 to 3
> for j=1 to 2
> arr.rowI(i).colJ(j)=10+i*1+j*3.2
> next
> next
> 
> for i =1 to 3
> for j =1 to 2
> print arr.rowI(i).colJ(j)
> next
> next
> 
> You can notice that the I dimension (number of rows) can be 
> dynamically redim'ed but that the J (number of columns) must 
> be dim'ed directly in the type statement.
> 
> Would anyone have another insight that would make that 
> solution more flexible?
> 
> Jacques Paris
> e-mail  [EMAIL PROTECTED]
> MapBasic-MapInfo support  http://www.paris-pc-gis.com
> 
> -----Original Message-----
> From: Peter Horsb�ll M�ller [mailto:[EMAIL PROTECTED]]
> Sent: January 31, 2003 06:01
> To: 'Possberg, Hendrik'; Mapinfo-List (E-Mail) (E-Mail)
> Subject: RE: MI-L Mapinfo.Net ?
> 
> You can allready now use "multi-dimensional" arrays in 
> MapBasic as - I think
> - Michael Hannah has pointed out:
> 
> Create a special type and use this for you array:
> 
> Type T_3DPOINT
>         fX      As Float
>         fY      As Float
>         fZ      As Float
> End Type
> 
> You can even use these types in other types, and when you use 
> these types they can be arrays as well:
> 
> Type T_3DPOLYLINE
>         nNumPoints      As Integer
>         tpNodes()       As T_3DPOINT
> End Type
> 
> Dim     arr3DPoints As T_3DPOINT,
>         arr3DPLines As T_3DPOLYLINE
> 
> But beware when doing this, the sligtest mistake might make 
> MapInfo crash with no warnings...
> 
> HTH,
> Peter Horsb�ll M�ller
> GIS Developer
> COWI A/S - Geografisk Information & IT
> Rug�rdsvej 55
> DK 5000 Odense C
> 
> Tel       +45 6313 5013
> Direct    +45 6313 5008
> Mobil     +45 2270 4308
> Fax       +45 6313 5090
> 
> Kampsax blev i juni 2002 overtaget af COWI. I forbindelse med 
> den igangv�rende integrationsprocess udskiftes vores Kampsax 
> e-mail adresser med COWI e-mail adresser.Hjemmesideadresser 
> forbliver u�ndrede
> 
> 
> > -----Original Message-----
> > From: Possberg, Hendrik [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 31, 2003 11:08 AM
> > To: Mapinfo-List (E-Mail) (E-Mail)
> > Subject: MI-L Mapinfo.Net ?
> > Importance: High
> >
> >
> > Hello List,
> >
> > after the announcement of Mapinfo "migrating" to the .NET 
> architecture 
> > last year I would like to know if someone got news about 
> this topic. 
> > e.g. -release date? -beta?
> >
> > Few days before I wrote a question concerning the use of arrays. In 
> > Mapbasic it is very annoying to have the restriction of only 
> > one-dimensional arrays.The migration to .NET architecture 
> would mean 
> > the further restriction are given by the used programming language 
> > (VB,C++,...). Multidimensional arrays would be no problem.
> > Is this right?
> >
> > Thanks in Advance.
> >
> >
> > Mit freundlichen Gr��en
> >
> >  Hendrik Po�berg
> >  Data & Methods
> >
> >  Phone: +49-2131-10 97 51
> >  mailto:[EMAIL PROTECTED]
> > __________________________________________________
> >
> >  microm
> >  Micromarketing-Systeme und Consult GmbH
> >  Hellersbergstr. 14
> >  41460 Neuss
> >  Germany
> >
> >  Phone: +49-2131-10 97 01
> >  Fax:     +49-2131-10 97 77
> >  mailto:[EMAIL PROTECTED]
> >  http://www.microm-online.de
> >  http://www.micromarketing.de 
> > __________________________________________________
> >
> > Diese Nachricht wurde elektronisch versandt und ist daher auch ohne 
> > Unterschrift rechtsg�ltig. Der Inhalt dieser E-Mail enth�lt 
> > vertrauliche Informationen. Das Kopieren und die Weitergabe 
> an Dritte 
> > ist nicht gestattet. Sollten Sie diese E-Mail irrt�mlich von uns 
> > erhalten haben, bitten wir Sie, diese zu vernichten und uns 
> dar�ber zu 
> > informieren. Im Voraus vielen Dank.
> >
> >
> > 
> ---------------------------------------------------------------------
> > List hosting provided by Directions Magazine | 
> www.directionsmag.com | 
> > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > Message number: 5257
> >
> 
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED]
> Message number: 5263
> 
> 
> 
> 
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED]
> Message number: 5267
> 

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5271

Reply via email to