read/data? 
Author Message
 read/data?

Is there a READ/DATA convention in RB? I have lots of numbers which need
to be permenently read into an array and thereafter used in computations.
The old READ/DATA commands were good for this.

If not in RB, is there a direct work around that anyone knows? At first
glance, I'd guess putting them into a text field and then extracting from
the text field into arrays. Sound ok to more expert programmers out there?

Thanks,
Marley



Thu, 26 Dec 2002 03:00:00 GMT  
 read/data?

Quote:

> Is there a READ/DATA convention in RB? I have lots of numbers which need
> to be permenently read into an array and thereafter used in computations.
> The old READ/DATA commands were good for this.

> If not in RB, is there a direct work around that anyone knows? At first
> glance, I'd guess putting them into a text field and then extracting from
> the text field into arrays. Sound ok to more expert programmers out there?

Why not.

const data="5,8,32,5,9,2,4,5" 'good old data like on my C64

dim i,c as integer
dim myarray(0) as integer 'the array

c=countfield(data,",") 'how many numbers
redim myarray(c-1)     'every number a place in the array (0 is first)

for i=1 to c
myarray(i-1)=val(nthfield(data,",",i))  'get them
next

Mfg
Christian

--
MegaPoster 1.0
Drucke deine eigenes MegaPoster bis 500 qm!
Infos und Demo unter: http://megaposter.christians-software.de



Thu, 26 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. reading data by using DIO read.vi (6025E board)

2. reading data by using DIO read.vi (6025E board)

3. I want write data to TestStand from LavView and Read data from LabView to TestStand

4. Reading data from a text file to store in a collection

5. Read/Data command

6. Reading data on a serial port

7. Q: VW2.0 Read Data from Files

8. Peachtree - How to read data in Clarion?

9. Reading data from memory address

10. Reading Data From 12bit AD-DA Card

11. Reading data from any ports?

12. read data from commport

 

 
Powered by phpBB® Forum Software