Blitz (260/640)

From:Dobbin
Date:28 Aug 99 at 17:52:33
Subject:Re: Phonecode Dilemma

On 28-Aug-99, Bippy M wrote:
> Hiya Guys,
>
> Okay I've sorta finished v1 of my phonecode proggie, and am now on v2 which
> will have many more features :)
>
> Anyway, I'd like your opinions!!
>
> I am basically reading the phonecodes into different arrays, I setup 20,000
> array elements in each array (I use about 10200 in each).. This obviously
> requires ALOT of memory, so what would be the best way arounf this..
> basically the arrays are:
>
> codes$ (20000)
> subcode$ (20000)
> areacode$(20000)
> display$ (20000)
>
> now each holds info codes holds the dialling code, and subcode holds all the
> little sub codes (eg 0181 (dial code) -897 (0181-897))..
>
> areacode$ holds the name of the area, and lastly display$ holds the info to
> be displayed!!
>
> I thought about reading codes into 1 array, and then using left$/Mid$ to get
> the info and compare it eg...
>
> suppose the following is a line from the codes.txt file:
>
> 0181 <20 spaces> London (greater)
>
> I could do a check for either
>
> if mid$(testline$(i),20,max_len_of_area)=inputted_area$) then dosomething
>
> would this be better??
>
> I'll try it I think :)
>
> Anyway, Ideas would be appreciated :)
>

Zoinkz!

Use random access files instead of arrays.

Regards,
Dobbin
/=-------------------------------------------------------------------=\
| Dobbin <dobbin@thenet.co.uk> - http://www.thenet.co.uk/~dobbin |
| A1200T PPC166 040/25 34Mb 2.1Gb 24xCD BVisionPPC USR-33.6 BossDS330 |
| DNRC: "Secretary of State for Propagandizing the Amiga" - TeamAmiga |
\=-------------------------------------------------------------------=/

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie