Converting a list to an array

This is a discussion on Converting a list to an array within the Pick Database forums in Other Databases category; Is there an intrinsic function in D3 to convert a list to an array? Thanks in advance for this group's always helpful repsonse/s! danny...

Go Back   Database Forum > Other Databases > Pick Database

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-22-2008, 01:19 PM
Default Converting a list to an array

Is there an intrinsic function in D3 to convert a list to an array?

Thanks in advance for this group's always helpful repsonse/s!

danny
Reply With Quote
  #2  
Old 08-22-2008, 01:54 PM
Default Re: Converting a list to an array

You could SELECT TO ,

or
OPEN 'POINTER-FILE' TO POINTER.FILE ELSE STOP 201, 'POINTER-FILE'
READ MY.ARRAY FROM POINTER.FILE,LIST.NAME ELSE MY.ARRAY = ""
Reply With Quote
  #3  
Old 08-22-2008, 01:57 PM
Default Re: Converting a list to an array

See MatParse and MatBuild in D3Ref.

drdanny wrote:
>Is there an intrinsic function in D3 to convert a list to an array?
>
>Thanks in advance for this group's always helpful repsonse/s!
>
>danny


Reply With Quote
  #4  
Old 08-22-2008, 09:57 PM
Default Re: Converting a list to an array

Hi
001 EXECUTE "SSELECT TEST"
002 SELECT TO MAINLIST
003 CNT = DCOUNT(MAINLIST,@AM)
004 DIM NEWLIST(CNT)
005 MATPARSE NEWLIST FROM MAINLIST
006 FOR A = 1 TO CNT
007 CRT NEWLIST(A)
008 NEXT A
Peter McMurray
"drdanny" wrote in message
news:15a31e7b-e7f6-42d4-84b5-994c18846d00-at-i24g2000prf.googlegroups.com...
> Is there an intrinsic function in D3 to convert a list to an array?
>
> Thanks in advance for this group's always helpful repsonse/s!
>
> danny



Reply With Quote
  #5  
Old 08-23-2008, 09:35 AM
Default Re: Converting a list to an array

How about

dyn.name = dim.name

For example:

DIM PARMS(100)

FLAT=PARMS

Or did you specifically want a function?

Malcolm Bull

Reply With Quote
  #6  
Old 08-23-2008, 12:13 PM
Default Re: Converting a list to an array

Danny, do you mean a dynamic array, or a dimensioned array?

Peter, can D3 use a variable in the DIM statement?
Reply With Quote
  #7  
Old 08-23-2008, 08:09 PM
Default Re: Converting a list to an array


"Douglas Tatelman" wrote in message
news:f0a989cb-2e5d-45d7-8eb7-a9ec3250840f-at-i20g2000prf.googlegroups.com...
> Danny, do you mean a dynamic array, or a dimensioned array?
>
> Peter, can D3 use a variable in the DIM statement?

YUP! and it can redim on the fly. As with any powerful statement,
redimensioning should be approached with great caution. Back in the DOS
days a twerp got hold of the DOS to Pick routine which was originally one of
the best written and commented programs that one could wish for.
Unfortunately said twerp decided to redimension an array by +1 for every new
DOS record that he read by the end of 1000 iterations what had been an
excellent fast program had just about ground the machine to a halt.
Peter McMurray


Reply With Quote
  #8  
Old 08-24-2008, 10:15 PM
Default Re: Converting a list to an array

Hi
I know that that is now a possibility but I find the MATPARSE and MATBUILD a
much clearer usage as there is a significant difference between the types of
variable that needs to be seen.
Peter McMurray
wrote in message
news:872d92b6-b3ac-48c8-b4ce-ed8951090791-at-79g2000hsk.googlegroups.com...
> How about
>
> dyn.name = dim.name
>
> For example:
>
> DIM PARMS(100)
>
> FLAT=PARMS
>
> Or did you specifically want a function?
>
> Malcolm Bull
>



Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 11:50 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.