Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

READ_ARRAY( cFname[, aArray] )

Purpose

Read the lines from a text file into an array.

Arguments

     cFname -- the name of the text file

     aArray -- if passed, the array to fill

Setup

This function is used twice in succession. The first call determines the
size of the array to declare, the second fills the array.

The first line of the text file must contain a numeric, indicating the
number of succeeding lines to read.

Example

     LOCAL file := "arrays.txt", array
     array := ARRAY( READ_ARRAY( file ) )  && Size it
     ? READ_ARRAY( file, array )           && Fill it

Returns

The number of lines in the text file.

Side Effects

Fills aArray if passed.

Artful Calls

READNEXT

Source File

AA_RDRA.PRG, AM_RDRA.PRG

Notes

This function makes it convenient to store array contents as text files,
where they can easily be updated using a text editor.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson